Generate genereric aeo and curse actions

merge/2021-11-19
kaetemi 3 years ago
parent 838a362fad
commit 010c2c84eb
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -21,8 +21,9 @@ base = {
# },
"magic": {
"damage": magicSpec,
"dot": magicSpec,
"heal": [ "hp", "sap", "stamina", "focus" ],
"aoe": magicSpec,
# "dot": magicSpec,
# "heal": [ "hp", "sap", "stamina", "focus" ],
"curse": curseSpec,
},
# "debuff": {
@ -64,9 +65,10 @@ spellRandomPostTime = 1.0
# magic_damage
# egs_static_ai_action.cpp
# Total Magic Damage = DamageValue + (SpellPowerFactor * creature.AttackLevel)
for spec in magicSpec:
for skill in base["magic"]:
for spec in base["magic"][skill]:
# for variant in variantSpec:
name = "magic_damage_" + spec
name = "magic_" + skill + "_" + spec
# randBoostFactor = zlib.crc32("SpellPowerFactor" + name) & 0xffffffff
# randBoostFactor = (((randBoostFactor % 2000) - 1000) * randomVariance) / 1000.0
randBoostFactor = 0.0
@ -87,8 +89,12 @@ for spec in magicSpec:
behaviour = "CAST_" + spec.upper()
if behaviour == "CAST_ELECTRICITY":
behaviour = "CAST_ELEC"
if behaviour == "CAST_SHOCKWAVE":
elif behaviour == "CAST_SHOCKWAVE":
behaviour = "CAST_SHOCK"
elif behaviour == "CAST_MADNESS":
behaviour = "CAST_MAD"
elif behaviour == "CAST_SNARE":
behaviour = "CAST_SLOW"
damageType = spec.upper()
if damageType == "SHOCKWAVE":
damageType = "SHOCK"
@ -97,7 +103,27 @@ for spec in magicSpec:
f.write("<FORM Version=\"4.0\" State=\"modified\">\n")
f.write(" <STRUCT>\n")
f.write(" <ATOM Name=\"type\" Value=\"DamageSpell\"/>\n")
if skill == "aoe":
f.write(" <ATOM Name=\"AreaType\" Value=\"Bomb\"/>\n")
f.write(" <ATOM Name=\"BombRadius\" Value=\"4\"/>\n")
f.write(" <ATOM Name=\"Behaviour\" Value=\"" + behaviour + "\"/>\n")
if skill == "curse":
effectType = spec[0].upper() + spec[1:]
if effectType == "Sleep":
effectType = "Mezz"
elif effectType == "Madness":
effectType = "MeleeMadness"
elif effectType == "Slow":
effectType = "SlowMelee"
elif effectType == "Snare":
effectType = "SlowMove"
referenceTime = spellBaseTime + spellRandomBaseTime / 2.0 + spellPostTime + spellRandomPostTime / 2.0
effectDuration = 10.0 * totalTime / referenceTime
f.write(" <ATOM Name=\"EffectType\" Value=\"" + effectType + "\"/>\n")
f.write(" <ATOM Name=\"EffectValue\" Value=\"75\"/>\n")
f.write(" <ATOM Name=\"EffectDuration\" Value=\"" + str(round(effectDuration, 1)) + "\"/>\n")
f.write(" <ATOM Name=\"EffectDurationType\" Value=\"Normal\"/>\n")
else:
f.write(" <ATOM Name=\"SpellPowerFactor\" Value=\"" + str(round(damagePerLevelFactor, 3))+ "\"/>\n")
f.write(" <ATOM Name=\"DamageScore\" Value=\"HitPoints\"/>\n")
f.write(" <ATOM Name=\"DamageType\" Value=\"" + damageType + "\"/>\n")

Loading…
Cancel
Save