Ejemplo n.º 1
0
func SendBattleEvent_ChangeHP(_player pul.IBattleCreature, _pokemonId int, _hp int) {
	message := netmsg.NewBattleEventMessage(pnet.BATTLEEVENT_CHANGEHP)
	message.PokemonId = uint32(_pokemonId)
	message.NewHP = uint16(_hp)

	_player.SendBattleMessage(message)
}
Ejemplo n.º 2
0
func SendBattleEvent_ChangePP(_player pul.IBattleCreature, _pokemonId int, _moveSlotId int, _newPP int) {
	message := netmsg.NewBattleEventMessage(pnet.BATTLEEVENT_CHANGEPP)
	message.PokemonId = uint32(_pokemonId)
	message.MoveSlotId = uint32(_moveSlotId)
	message.NewPP = uint8(_newPP)

	_player.SendBattleMessage(message)
}
Ejemplo n.º 3
0
func NewPlayerTeamFromPlayer(_player pul.IBattleCreature) *PlayerTeam {
	playerTeam := PlayerTeam{}
	playerTeam.Nick = _player.GetName()
	playerTeam.Info = "PU Client"
	playerTeam.LoseMessage = "bgnt"
	playerTeam.WinMessage = "gg"
	playerTeam.avatar = 0
	playerTeam.DefaultTier = ""
	playerTeam.Team = NewTeamFromParty(_player.GetPokemonParty())

	return &playerTeam
}