class_name BattleSlot extends RefCounted #un emplacement actif sur le terrain. Contient un BattleMon ou reste vide. var id : int = 0 #unique dans le combat var side : int = 0 #0 = camp du joueur, 1 = camp adverse var index : int = 0 #position dans son camp (0, 1, 2...) var participant : BattleParticipant var mon : BattleMon = null func is_occupied() -> bool: return mon != null func is_active() -> bool: #occupe par un pokemon encore apte au combat return mon != null and !mon.is_fainted() func set_pokemon(pokemon : PokemonInstance) -> BattleMon: mon = BattleMon.new(pokemon) mon.slot_id = id return mon func clear() -> void: mon = null