Commit 3906b7a3e21ef98e16fbf7b5ce2bab35455a3ae7

Authored by yutio888
1 parent 1e15d6da

fix Ice storm & Glacial Vapour damage type

... ... @@ -1436,7 +1436,7 @@ newDamageType{
1436 1436 local target = game.level.map(x, y, Map.ACTOR)
1437 1437 if target and target:hasEffect(target.EFF_WET) then dam = dam * 1.3 chance = 50 end
1438 1438
1439   - dam = type(dam) == "number" and {dam=dam} or dam
  1439 + dam = _G.type(dam) == "number" and {dam=dam} or dam
1440 1440 local realdam = DamageType:get(DamageType.COLD).projector(src, x, y, DamageType.COLD, dam.dam, state)
1441 1441 if rng.percent(chance) then
1442 1442 DamageType:get(DamageType.FREEZE).projector(src, x, y, DamageType.FREEZE, {dur=2, hp=70+dam.dam*1.5, apply_power=dam.apply_power}, state)
... ... @@ -1454,7 +1454,7 @@ newDamageType{
1454 1454 local chance = 0
1455 1455 local target = game.level.map(x, y, Map.ACTOR)
1456 1456 if target and target:hasEffect(target.EFF_WET) then dam = dam * 1.3 chance = 15 end
1457   - dam = type(dam) == "number" and {dam=dam} or dam
  1457 + dam = _G.type(dam) == "number" and {dam=dam} or dam
1458 1458 local realdam = DamageType:get(DamageType.COLD).projector(src, x, y, DamageType.COLD, dam.dam, state)
1459 1459 if rng.percent(chance) then
1460 1460 DamageType:get(DamageType.FREEZE).projector(src, x, y, DamageType.FREEZE, {dur=2, hp=70+dam.dam*1.2, apply_power=dam.apply_power}, state)
... ... @@ -1834,7 +1834,7 @@ newDamageType{
1834 1834 state = initState(state)
1835 1835 useImplicitCrit(src, state)
1836 1836 local power
1837   - if type(dam) == "table" then
  1837 + if _G.type(dam) == "table" then
1838 1838 power = dam.apply_power
1839 1839 dam = dam.dam
1840 1840 end
... ...