Module: Battle::Move::Mechanics::TypesBasedOnItem
- Includes:
- ItemBased
- Included in:
- Judgment, NaturalGift
- Defined in:
- scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00050 ItemBased.rb
Overview
Preset used for attacks with power based on held item. Should be included only in a Battle::Move class or a class with the same interface The includer must overwrite the following methods:
-
private consume_item?
-
private valid_item_hold?
-
private get_types_by_item
Instance Method Summary collapse
-
#definitive_types(user, target) ⇒ Array<Integer>
(also: #types_based_on_item_definitive_types)
Get the types of the move with 1st type being affected by effects.
Methods included from ItemBased
Instance Method Details
#definitive_types(user, target) ⇒ Array<Integer> Also known as: types_based_on_item_definitive_types
Get the types of the move with 1st type being affected by effects
103 104 105 106 107 108 |
# File 'scripts/01600 Alpha 25 Battle Engine/04150 Battle_Move/00001 Mechanics/00050 ItemBased.rb', line 103 def definitive_types(user, target) return super unless valid_held_item?(user.item_db_symbol) log_data("types = #{get_types_by_item(user.item_db_symbol)} # move based on held item") return get_types_by_item(user.item_db_symbol) end |