Merge pull request #528 from BenLubar/fix-showunitsyndromes

fix ShowUnitSyndromes
develop
Lethosor 2015-02-03 21:23:33 -05:00
commit 51b7b1adba
1 changed files with 18 additions and 18 deletions

@ -290,13 +290,13 @@ def get_interaction(interaction)
#result = result + "m=#{interaction.unk_170} n=#{interaction.unk_18c} o=#{interaction.unk_1a8} p=#{interaction.unk_1c4} q=#{interaction.unk_1e8} r=#{interaction.unk_25c} " #result = result + "m=#{interaction.unk_170} n=#{interaction.unk_18c} o=#{interaction.unk_1a8} p=#{interaction.unk_1c4} q=#{interaction.unk_1e8} r=#{interaction.unk_25c} "
#result = result + "s=#{interaction.unk_278}" #result = result + "s=#{interaction.unk_278}"
if interaction.unk_25c == "" if interaction.name == ""
name = "mystery" name = "mystery"
else else
name = interaction.unk_25c name = interaction.name
end end
return "ability=#{get_display_name(interaction.unk_25c, interaction.unk_e4)}, delay=#{interaction.unk_278}, actionType=TODO, range=TODO, maxTargets=TODO" return "ability=#{get_display_name(interaction.name, interaction.verb[0])}, delay=#{interaction.usage_delay}, actionType=TODO, range=TODO, maxTargets=TODO"
end end
def get_effect_flags(flags) def get_effect_flags(flags)
@ -702,7 +702,7 @@ def get_effect(logger, ce, ticks, showdisplayeffects)
when "DISPLAY_TILE" when "DISPLAY_TILE"
if !showdisplayeffects then return "", Output::DEFAULT end if !showdisplayeffects then return "", Output::DEFAULT end
name = "Tile" name = "Tile"
desc = "Tile=#{ce.unk_6c}, Colour=#{ce.unk_70}" desc = "Tile=#{ce.tile}, Colour=#{ce.color}"
color = Output::DEFAULT color = Output::DEFAULT
when "FLASH_TILE" when "FLASH_TILE"
if !showdisplayeffects then return "", Output::DEFAULT end if !showdisplayeffects then return "", Output::DEFAULT end
@ -715,8 +715,8 @@ def get_effect(logger, ce, ticks, showdisplayeffects)
name = "Physical" name = "Physical"
desc = "speed(" desc = "speed("
value = ce.unk_6c value = ce.bonus_add
percent = ce.unk_70 percent = ce.bonus_perc
if(value!=0) if(value!=0)
desc = desc + "%+d" % value desc = desc + "%+d" % value
end end
@ -745,11 +745,11 @@ def get_effect(logger, ce, ticks, showdisplayeffects)
color = Output::GREEN color = Output::GREEN
when "SKILL_ROLL_ADJUST" when "SKILL_ROLL_ADJUST"
name = "Skill check" name = "Skill check"
desc = "modifier=#{ce.unk_6c}%, chance=#{ce.unk_70}%" desc = "modifier=#{ce.multiplier}%, chance=#{ce.chance}%"
if ce.unk_6c > 100 if ce.multiplier > 100
color = Output::GREEN color = Output::GREEN
elsif ce.unk_6c < 100 elsif ce.multiplier < 100
color = Output::RED color = Output::RED
else else
color = Output::DEFAULT color = Output::DEFAULT
@ -758,8 +758,8 @@ def get_effect(logger, ce, ticks, showdisplayeffects)
when "BODY_TRANSFORMATION" when "BODY_TRANSFORMATION"
name = "Transformation" name = "Transformation"
if ce.unk_6c > 0 if ce.chance > 0
chance = ", chance=#{ce.unk_6c} " chance = ", chance=#{ce.chance} "
else else
chance = "" chance = ""
end end
@ -785,19 +785,19 @@ def get_effect(logger, ce, ticks, showdisplayeffects)
color = data[1] color = data[1]
when "MATERIAL_FORCE_MULTIPLIER" when "MATERIAL_FORCE_MULTIPLIER"
name = "Material force multiplier" name = "Material force multiplier"
desc = "received damage scaled by #{(ce.unk_c8 * 100 / ce.unk_cc * 100)/100}%" desc = "received damage scaled by #{(ce.fraction_mul * 100 / ce.fraction_div * 100)/100}%"
if ce.unk_cc > ce.unk_c8 if ce.fraction_div > ce.fraction_mul
color = Output::GREEN color = Output::GREEN
elsif ce.unk_cc < ce.unk_c8 elsif ce.fraction_div < ce.fraction_mul
color = Output::RED color = Output::RED
else else
color = Output::DEFAULT color = Output::DEFAULT
end end
if ce.unk_c4 >=0 if ce.mat_index >=0
mat = df.decode_mat(ce.unk_c0, ce.unk_c4 ) mat = df.decode_mat(ce.mat_type, ce.mat_index )
elsif ce.unk_c0 >= 0 elsif ce.mat_type >= 0
mat = df.decode_mat(ce.unk_c0, 0 ) mat = df.decode_mat(ce.mat_type, 0 )
else else
mat = nil mat = nil
end end