All Questions

Community

v
Wessel van Lit

Simplify return for '_is_weak_to'

func _is_weak_to(battler: Battler, action: ActionData) -> bool:
    return true if action.element in battler.stats.weaknesses else false

Can be simplified to:

func _is_weak_to(battler: Battler, action: ActionData) -> bool:
    return action.element in battler.stats.weaknesses


  • Nathan Lovato replied

    Sure, thanks!