Method: Pktool::Attack#type_effect
- Defined in:
- lib/attack.rb
#type_effect ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/attack.rb', line 23 def type_effect type_effect = open("data/type.json") do |io| JSON.load(io) end @type_rate *= type_effect[@defender.type1][@move.attack_type] @type_rate *= type_effect[@defender.type2][@move.attack_type] unless @defender.type2.empty? end |