Method: CombatSim.mobDmg

Defined in:
lib/lotrd/controller/combatController.rb

.mobDmgObject



53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/lotrd/controller/combatController.rb', line 53

def mobDmg
    @mobAction = rand(1..3)
    case @mobAction
    when 1
        (@currentMobStr - @currentPlayerDef) > 0 ? dmg = (@currentMobStr - @currentPlayerDef) : dmg = 0
    when 2
        (@currentMobInt - @currentPlayerRes) > 0 ? dmg = (@currentMobInt - @currentPlayerRes): dmg = 0
    when 3
        (@currentMobDex - @currentPlayerDef) > 0 ? dmg = (@currentMobDex - @currentPlayerDef) : dmg = 0
    end
    ::CombatSim.mobCrit(dmg)
end