13 lines
463 B
GDScript
13 lines
463 B
GDScript
class_name BurnEffect
|
|
extends BattleEffect
|
|
|
|
func _init() -> void:
|
|
id = &"burn"
|
|
|
|
func modify_stat(_mon : BattleMon, stat : PokemonNature.Stat, value : float) -> float:
|
|
return value * 0.5 if stat == PokemonNature.Stat.ATTACK else value
|
|
|
|
func on_turn_end(battle : Battle, slot : BattleSlot) -> void:
|
|
var amount : int = maxi(1, floori(slot.mon.pokemon.get_max_hp() / 16.0))
|
|
await battle.hurt(slot, amount, "%s souffre de sa brûlure !" % slot.mon.display_name())
|