1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Get rid of mainEffectAnim

This commit is contained in:
AlexVinS 2014-11-28 01:03:25 +03:00
parent d94f15bdf4
commit 8f84e24aa6
9 changed files with 89 additions and 100 deletions

View File

@ -180,11 +180,6 @@
"description": "NO_TARGET - instant cast no aiming, default; CREATURE - target is unit; OBSTACLE - target is OBSTACLE; LOCATION - target is location",
"enum": ["NO_TARGET","CREATURE","OBSTACLE","LOCATION"]
},
"anim":{
"type": "number",
"description": "Main effect animation (AC format), -1 - none, deprecated",
"minimum": -1
},
"counters":{
"$ref" : "#/definitions/flags",
"description": "Flags structure ids of countering spells"

View File

@ -1,8 +1,7 @@
{
"stoneGaze" : {
"index" : 70,
"targetType": "NO_TARGET",
"anim" : 70,
"targetType": "NO_TARGET",
"animation":{
//need special animation
},
@ -38,7 +37,7 @@
"poison" : {
"index" : 71,
"targetType": "NO_TARGET",
"anim" : 67,
"animation":{
"affect":["SP11_"]
},
@ -76,7 +75,7 @@
"bind" : {
"index" : 72,
"targetType": "NO_TARGET",
"anim" : 68,
"animation":{
"affect":["SP02_"]
},
@ -103,7 +102,7 @@
"disease" : {
"index" : 73,
"targetType": "NO_TARGET",
"anim" : 69,
"animation":{
"affect":["SP05_"]
},
@ -141,7 +140,7 @@
"paralyze" : {
"index" : 74,
"targetType": "NO_TARGET",
"anim" : 70,
"animation":{
//missing
},
@ -177,7 +176,7 @@
"age" : {
"index" : 75,
"targetType": "NO_TARGET",
"anim" : 71,
"animation":{
"affect":["SP01_"]
},
@ -209,7 +208,7 @@
"deathCloud" : {
"index" : 76,
"targetType": "NO_TARGET",
"anim" : 72,
"animation":{
"hit":["SP04_"]
},
@ -232,7 +231,7 @@
"thunderbolt" : {
"index" : 77,
"targetType": "NO_TARGET",
"anim" : 38,
"animation":{
"affect":[{"defName":"C03SPA0", "verticalPosition":"bottom"}, "C11SPA1"]
},
@ -253,7 +252,7 @@
"dispelHelpful" : {
"index" : 78,
"targetType": "NO_TARGET",
"anim" : 41,
"animation":{
"affect":["C05SPW"]
},
@ -273,7 +272,7 @@
"deathStare" : {
"index" : 79,
"targetType": "NO_TARGET",
"anim" : 80,
"animation":{
"affect":["C07SPE0"]
},
@ -296,9 +295,9 @@
"acidBreath" : {
"index" : 80,
"targetType": "NO_TARGET",
"anim" : 81,
"animation":{
"affect":["C17SPW0"]
//???
},
"sounds": {
"cast": "ACID"
@ -325,9 +324,9 @@
"acidBreathDamage" : {
"index" : 81,
"targetType": "NO_TARGET",
"anim" : 81,
"animation":{
//???
"affect":["C17SPW0"]
},
"sounds": {
"cast": "ACID"

View File

@ -1,7 +1,7 @@
{
"summonBoat" : {
"index" : 0,
"anim" : -1,
"targetType": "NO_TARGET",
"sounds": {
"cast": "SUMMBOAT"
@ -18,7 +18,7 @@
"scuttleBoat" : {
"index" : 1,
"targetType": "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "SCUTBOAT"
},
@ -34,7 +34,7 @@
"visions" : {
"index" : 2,
"targetType": "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "VISIONS"
},
@ -50,7 +50,7 @@
"viewEarth" : {
"index" : 3,
"targetType": "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "VIEW"
},
@ -66,7 +66,7 @@
"disguise" : {
"index" : 4,
"targetType": "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "DISGUISE"
},
@ -82,7 +82,7 @@
"viewAir" : {
"index" : 5,
"targetType": "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "VIEW"
},
@ -98,7 +98,7 @@
"fly" : {
"index" : 6,
"targetType": "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "FLYSPELL"
},
@ -114,7 +114,7 @@
"waterWalk" : {
"index" : 7,
"targetType": "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "WATRWALK"
},
@ -130,7 +130,7 @@
"dimensionDoor" : {
"index" : 8,
"targetType": "LOCATION",
"anim" : -1,
"sounds": {
"cast": "TELPTOUT"
},
@ -146,7 +146,7 @@
"townPortal" : {
"index" : 9,
"targetType": "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "TELPTOUT"
},

View File

@ -2,7 +2,7 @@
"magicArrow" : {
"index" : 15,
"targetType": "CREATURE",
"anim" : 64,
"animation":{
"projectile": [
{"minimumAngle": 0 ,"defName":"C20SPX4"},
@ -34,7 +34,7 @@
"iceBolt" : {
"index" : 16,
"targetType": "CREATURE",
"anim" : 46,
"animation":{
"projectile": [
{"minimumAngle": 0 ,"defName":"C08SPW4"},
@ -66,7 +66,7 @@
"lightningBolt" : {
"index" : 17,
"targetType": "CREATURE",
"anim" : 38,
"animation":{
"affect":[{"defName":"C03SPA0", "verticalPosition":"bottom"}, "C11SPA1"]
},
@ -91,7 +91,7 @@
"implosion" : {
"index" : 18,
"targetType": "CREATURE",
"anim" : 10,
"animation":{
"affect":["C05SPE0"]
},
@ -117,7 +117,7 @@
"chainLightning" : {
"index" : 19,
"targetType": "CREATURE",
"anim" : 38,
"animation":{
"affect":[{"defName":"C03SPA0", "verticalPosition":"bottom"}, "C11SPA1"]
},
@ -139,7 +139,7 @@
"frostRing" : {
"index" : 20,
"targetType": "LOCATION",
"anim" : 45,
"animation":{
"hit":["C07SPW"] //C07SPW0 ???
},
@ -164,7 +164,7 @@
"fireball" : {
"index" : 21,
"targetType": "LOCATION",
"anim" : 53,
"animation":{
"hit":["C13SPF"] //C13SPF0 ???
},
@ -189,7 +189,7 @@
"inferno" : {
"index" : 22,
"targetType": "LOCATION",
"anim" : 9,
"animation":{
"hit":["C04SPF0"]
},
@ -214,7 +214,7 @@
"meteorShower" : {
"index" : 23,
"targetType": "LOCATION",
"anim" : 16,
"animation":{
"hit":["C08SPE0"]
},
@ -239,7 +239,7 @@
"deathRipple" : {
"index" : 24,
"targetType" : "CREATURE",
"anim" : 8,
"animation":{
"affect":["C04SPE0"]
},
@ -268,7 +268,7 @@
"destroyUndead" : {
"index" : 25,
"targetType" : "CREATURE",
"anim" : 29,
"animation":{
"affect":["C14SPA0"]
},
@ -296,7 +296,7 @@
"armageddon" : {
"index" : 26,
"targetType" : "CREATURE",
"anim" : 12,
"animation":{
"hit":["C06SPF0"]
},
@ -321,7 +321,7 @@
"titanBolt" : {
"index" : 57,
"targetType" : "CREATURE",
"anim" : 38,
"animation":{
"hit":[{"defName":"C03SPA0", "verticalPosition":"bottom"}, "C11SPA1"]
},

View File

@ -2,7 +2,7 @@
"quicksand" : {
"index" : 10,
"targetType" : "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "QUIKSAND"
},
@ -18,7 +18,7 @@
"landMine" : {
"index" : 11,
"targetType" : "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": ""
},
@ -38,7 +38,7 @@
"forceField" : {
"index" : 12,
"targetType" : "LOCATION",
"anim" : -1,
"sounds": {
"cast": "FORCEFLD"
},
@ -57,7 +57,7 @@
"fireWall" : {
"index" : 13,
"targetType" : "LOCATION",
"anim" : -1,
"sounds": {
"cast": "FIREWALL"
},
@ -80,7 +80,7 @@
"earthquake" : {
"index" : 14,
"targetType" : "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "ERTHQUAK"
},
@ -97,7 +97,7 @@
"dispel" : {
"index" : 35,
"targetType" : "CREATURE",
"anim" : 41,
"animation":{
"affect":["C05SPW"] //C05SPW0
},
@ -122,7 +122,7 @@
"animation":{
"affect":["C03SPW"]//C03SPW0
},
"anim" : 39,
"sounds": {
"cast": "CURE"
},
@ -142,7 +142,7 @@
"resurrection" : {
"index" : 38,
"targetType" : "CREATURE",
"anim" : 79,
"animation":{
"affect":["C01SPE0"]
},
@ -167,7 +167,7 @@
"animateDead" : {
"index" : 39,
"targetType" : "CREATURE",
"anim" : 79,
"animation":{
"affect":["C01SPE0"]
},
@ -191,7 +191,7 @@
"sacrifice" : {
"index" : 40,
"targetType" : "CREATURE",
"anim" : 79,
"animation":{
"affect":["C01SPE0"]
},
@ -216,7 +216,7 @@
"teleport" : {
"index" : 63,
"targetType" : "CREATURE",
"anim" : -1,
"sounds": {
"cast": "TELPTOUT"
},
@ -236,7 +236,7 @@
"removeObstacle" : {
"index" : 64,
"targetType" : "OBSTACLE",
"anim" : -1,
"sounds": {
"cast": "REMOVEOB"
},
@ -252,7 +252,7 @@
"clone" : {
"index" : 65,
"targetType" : "CREATURE",
"anim" : -1,
"sounds": {
"cast": "CLONE"
},
@ -272,7 +272,7 @@
"fireElemental" : {
"index" : 66,
"targetType" : "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "SUMNELM"
},
@ -288,7 +288,7 @@
"earthElemental" : {
"index" : 67,
"targetType" : "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "SUMNELM"
},
@ -304,7 +304,7 @@
"waterElemental" : {
"index" : 68,
"targetType" : "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "SUMNELM"
},
@ -320,7 +320,7 @@
"airElemental" : {
"index" : 69,
"targetType" : "NO_TARGET",
"anim" : -1,
"sounds": {
"cast": "SUMNELM"
},

View File

@ -2,7 +2,7 @@
"shield" : {
"index" : 27,
"targetType" : "CREATURE",
"anim" : 27,
"animation":{
"affect":["C13SPE0"]
},
@ -32,7 +32,7 @@
"airShield" : {
"index" : 28,
"targetType" : "CREATURE",
"anim" : 2,
"animation":{
"affect":["C01SPA0"]
},
@ -62,7 +62,7 @@
"fireShield" : {
"index" : 29,
"targetType" : "CREATURE",
"anim" : 11,
"animation":{
"affect":["C05SPF0"]
},
@ -94,7 +94,7 @@
"protectAir" : {
"index" : 30,
"targetType" : "CREATURE",
"anim" : 22,
"animation":{
"affect":["C11SPE0"]
},
@ -124,7 +124,7 @@
"protectFire" : {
"index" : 31,
"targetType" : "CREATURE",
"anim" : 24,
"animation":{
"affect":["C11SPW0"]
},
@ -154,7 +154,7 @@
"protectWater" : {
"index" : 32,
"targetType" : "CREATURE",
"anim" : 23,
"animation":{
"affect":["C11SPF0"]
},
@ -184,7 +184,7 @@
"protectEarth" : {
"index" : 33,
"targetType" : "CREATURE",
"anim" : 26,
"animation":{
"affect":["C13SPA0"]
},
@ -214,7 +214,7 @@
"antiMagic" : {
"index" : 34,
"targetType" : "CREATURE",
"anim" : 5,
"animation":{
"affect":["C02SPE0"]
},
@ -257,7 +257,7 @@
"magicMirror" : {
"index" : 36,
"targetType" : "CREATURE",
"anim" : 3,
"animation":{
"affect":["C02SPA0"]
},
@ -284,7 +284,7 @@
"bless" : {
"index" : 41,
"targetType" : "CREATURE",
"anim" : 36,
"animation":{
"affect":["C01SPW"] //C01SPW0
},
@ -322,7 +322,7 @@
"curse" : {
"index" : 42,
"targetType" : "CREATURE",
"anim" : 40,
"animation":{
"affect":["C04SPW"]//C04SPW0
},
@ -361,7 +361,7 @@
"bloodlust" : {
"index" : 43,
"targetType" : "CREATURE",
"anim" : 4,
"animation":{
"affect":["SP12_"] //???
},
@ -408,7 +408,7 @@
"precision" : {
"index" : 44,
"targetType" : "CREATURE",
"anim" : 25,
"animation":{
"affect":["C12SPA0"]
},
@ -455,7 +455,7 @@
"weakness" : {
"index" : 45,
"targetType" : "CREATURE",
"anim" : 56,
"animation":{
"affect":["C0ACID"]
},
@ -502,7 +502,7 @@
"stoneSkin" : {
"index" : 46,
"targetType" : "CREATURE",
"anim" : 54,
"animation":{
"affect":["C16SPE"] //C16SPE0
},
@ -545,7 +545,7 @@
"disruptingRay" : {
"index" : 47,
"targetType" : "CREATURE",
"anim" : 14,
"animation":{
"affect":["C07SPA1"],
"projectile":[{"defName":"C07SPA0"}]//???
@ -589,7 +589,7 @@
"prayer" : {
"index" : 48,
"targetType" : "CREATURE",
"anim" : 0,
"animation":{
"affect":[{"defName":"C10SPW", "verticalPosition":"bottom"}]
},
@ -656,7 +656,7 @@
"mirth" : {
"index" : 49,
"targetType" : "CREATURE",
"anim" : 20,
"animation":{
"affect":["C09SPW0"]
},
@ -708,7 +708,7 @@
"sorrow" : {
"index" : 50,
"targetType" : "CREATURE",
"anim" : 30,
"animation":{
"affect":["C14SPE0"]
},
@ -760,7 +760,7 @@
"fortune" : {
"index" : 51,
"targetType" : "CREATURE",
"anim" : 18,
"animation":{
"affect":["C09SPA0"]
},
@ -805,7 +805,7 @@
"misfortune" : {
"index" : 52,
"targetType" : "CREATURE",
"anim" : 48,
"animation":{
"affect":["C10SPF0"]
},
@ -850,7 +850,7 @@
"haste" : {
"index" : 53,
"targetType" : "CREATURE",
"anim" : 31,
"animation":{
"affect":["C15SPA0"]
},
@ -899,7 +899,7 @@
"slow" : {
"index" : 54,
"targetType" : "CREATURE",
"anim" : 19,
"animation":{
"affect":[{"defName":"C09SPE0", "verticalPosition":"bottom"}]
},
@ -950,7 +950,7 @@
"slayer" : {
"index" : 55,
"targetType" : "CREATURE",
"anim" : 28,
"animation":{
"affect":["C13SPW0"]
},
@ -1004,7 +1004,7 @@
"frenzy" : {
"index" : 56,
"targetType" : "CREATURE",
"anim" : 17,
"animation":{
"affect":["C08SPF0"]
},
@ -1046,7 +1046,7 @@
"counterstrike" : {
"index" : 58,
"targetType" : "CREATURE",
"anim" : 7,
"animation":{
"affect":["C04SPA0"]
},
@ -1088,7 +1088,7 @@
"berserk" : {
"index" : 59,
"targetType" : "CREATURE",
"anim" : 35,
"animation":{
"affect":["C01SPF"] //C01SPF0
},
@ -1150,7 +1150,7 @@
"hypnotize" : {
"index" : 60,
"targetType" : "CREATURE",
"anim" : 21,
"animation":{
"affect":["C10SPA0"]
},
@ -1210,7 +1210,7 @@
"forgetfulness" : {
"index" : 61,
"targetType" : "CREATURE",
"anim" : 42,
"animation":{
"affect":["C06SPW"]//C06SPW0
},
@ -1273,7 +1273,7 @@
"blind" : {
"index" : 62,
"targetType" : "CREATURE",
"anim" : 6,
"animation":{
"affect":["C02SPF0"]
},

View File

@ -95,7 +95,6 @@ CSpell::CSpell():
earth(false), water(false), fire(false), air(false),
combatSpell(false), creatureAbility(false),
positiveness(ESpellPositiveness::NEUTRAL),
mainEffectAnim(-1),
defaultProbability(0),
isRising(false), isDamage(false), isOffensive(false),
targetType(ETargetType::NO_TARGET),
@ -803,9 +802,6 @@ CSpell * CSpellHandler::loadFromJson(const JsonNode& json)
else
logGlobal->warnStream() << "Spell " << spell->name << ". Target type " << (targetType.empty() ? "empty" : "unknown ("+targetType+")") << ". Assumed NO_TARGET.";
spell->mainEffectAnim = json["anim"].Float();
for(const auto & counteredSpell: json["counters"].Struct())
if (counteredSpell.second.Bool())
{

View File

@ -216,7 +216,6 @@ public:
bool isCastableBy(const IBonusBearer * caster, bool hasSpellBook, const std::set<SpellID> & spellBook) const;
std::vector<BattleHex> rangeInHexes(BattleHex centralHex, ui8 schoolLvl, ui8 side, bool *outDroppedHexes = nullptr ) const; //convert range to specific hexes; last optional out parameter is set to true, if spell would cover unavailable hexes (that are not included in ret)
si16 mainEffectAnim; //main spell effect animation, in AC format (or -1 when none) DEPRECATED
ETargetType getTargetType() const; //deprecated
CSpell::TargetInfo getTargetInfo(const int level) const;
@ -290,7 +289,7 @@ public:
template <typename Handler> void serialize(Handler &h, const int version)
{
h & identifier & id & name & level & power
& probabilities & attributes & combatSpell & creatureAbility & positiveness & counteredSpells & mainEffectAnim;
& probabilities & attributes & combatSpell & creatureAbility & positiveness & counteredSpells;
h & isRising & isDamage & isOffensive;
h & targetType;
h & immunities & limiters & absoluteImmunities & absoluteLimiters;

View File

@ -856,8 +856,8 @@ void AcidBreathDamageMechnics::applyBattleEffects(const SpellCastEnvironment * e
for(auto & attackedCre : ctx.attackedCres) //no immunities
{
BattleStackAttacked bsa;
bsa.flags |= BattleStackAttacked::EFFECT;
bsa.effect = owner->mainEffectAnim;
bsa.flags |= BattleStackAttacked::SPELL_EFFECT;
bsa.spellID = owner->id;
bsa.damageAmount = parameters.usedSpellPower; //damage times the number of attackers
bsa.stackAttacked = (attackedCre)->ID;
bsa.attackerID = -1;
@ -997,8 +997,8 @@ void DeathStareMechnics::applyBattleEffects(const SpellCastEnvironment * env, Ba
for(auto & attackedCre : ctx.attackedCres)
{
BattleStackAttacked bsa;
bsa.flags |= BattleStackAttacked::EFFECT;
bsa.effect = owner->mainEffectAnim; //from config\spell-Info.txt
bsa.flags |= BattleStackAttacked::SPELL_EFFECT;
bsa.spellID = owner->id;
bsa.damageAmount = parameters.usedSpellPower * (attackedCre)->valOfBonuses(Bonus::STACK_HEALTH);
bsa.stackAttacked = (attackedCre)->ID;
bsa.attackerID = -1;