mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed typo bonus duration enum. Mod compatibility retained.
This commit is contained in:
parent
8aa31f4073
commit
245d17a9e9
@ -18,14 +18,14 @@
|
||||
"type" : "NOT_ACTIVE",
|
||||
"subtype" : 62,
|
||||
"duration" : [
|
||||
"UNITL_BEING_ATTACKED",
|
||||
"UNTIL_BEING_ATTACKED",
|
||||
"N_TURNS"
|
||||
]
|
||||
},
|
||||
"noRetaliation" : {
|
||||
"val" : 0,
|
||||
"type" : "NO_RETALIATION",
|
||||
"duration" : "UNITL_BEING_ATTACKED"
|
||||
"duration" : "UNTIL_BEING_ATTACKED"
|
||||
},
|
||||
"defenceBoost" : {
|
||||
"type" : "PRIMARY_SKILL",
|
||||
@ -33,7 +33,7 @@
|
||||
"val" : 50,
|
||||
"valueType" : "PERCENT_TO_ALL",
|
||||
"duration" : [
|
||||
"UNITL_BEING_ATTACKED",
|
||||
"UNTIL_BEING_ATTACKED",
|
||||
"N_TURNS"
|
||||
]
|
||||
}
|
||||
@ -176,14 +176,14 @@
|
||||
"type" : "NOT_ACTIVE",
|
||||
"subtype" : 74,
|
||||
"duration" : [
|
||||
"UNITL_BEING_ATTACKED",
|
||||
"UNTIL_BEING_ATTACKED",
|
||||
"N_TURNS"
|
||||
]
|
||||
},
|
||||
"noRetaliation" : {
|
||||
"val" : 0,
|
||||
"type" : "NO_RETALIATION",
|
||||
"duration" : "UNITL_BEING_ATTACKED"
|
||||
"duration" : "UNTIL_BEING_ATTACKED"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1288,14 +1288,14 @@
|
||||
"type" : "NOT_ACTIVE",
|
||||
"subtype" : 62,
|
||||
"duration" : [
|
||||
"UNITL_BEING_ATTACKED",
|
||||
"UNTIL_BEING_ATTACKED",
|
||||
"N_TURNS"
|
||||
]
|
||||
},
|
||||
"generalAttackReduction" : {
|
||||
"type" : "GENERAL_ATTACK_REDUCTION",
|
||||
"duration" : [
|
||||
"UNITL_BEING_ATTACKED",
|
||||
"UNTIL_BEING_ATTACKED",
|
||||
"N_TURNS"
|
||||
]
|
||||
}
|
||||
@ -1307,7 +1307,7 @@
|
||||
"val" : 0,
|
||||
"type" : "NO_RETALIATION",
|
||||
"duration" : [
|
||||
"UNITL_BEING_ATTACKED",
|
||||
"UNTIL_BEING_ATTACKED",
|
||||
"N_TURNS"
|
||||
]
|
||||
}
|
||||
|
@ -47,10 +47,11 @@ const std::map<std::string, ui16> bonusDurationMap =
|
||||
BONUS_ITEM(ONE_WEEK)
|
||||
BONUS_ITEM(N_TURNS)
|
||||
BONUS_ITEM(N_DAYS)
|
||||
BONUS_ITEM(UNITL_BEING_ATTACKED)
|
||||
BONUS_ITEM(UNTIL_BEING_ATTACKED)
|
||||
BONUS_ITEM(UNTIL_ATTACK)
|
||||
BONUS_ITEM(STACK_GETS_TURN)
|
||||
BONUS_ITEM(COMMANDER_KILLED)
|
||||
{ "UNITL_BEING_ATTACKED", Bonus::UNTIL_BEING_ATTACKED }//typo, but used in some mods
|
||||
};
|
||||
|
||||
const std::map<std::string, Bonus::LimitEffect> bonusLimitEffect =
|
||||
|
@ -267,7 +267,7 @@ struct DLL_LINKAGE Bonus : public std::enable_shared_from_this<Bonus>
|
||||
ONE_WEEK = 8, //at the end of week (bonus lasts till the end of week, thats NOT 7 days
|
||||
N_TURNS = 16, //used during battles, after battle bonus is always removed
|
||||
N_DAYS = 32,
|
||||
UNITL_BEING_ATTACKED = 64, /*removed after attack and counterattacks are performed*/
|
||||
UNTIL_BEING_ATTACKED = 64, /*removed after attack and counterattacks are performed*/
|
||||
UNTIL_ATTACK = 128, /*removed after attack and counterattacks are performed*/
|
||||
STACK_GETS_TURN = 256, /*removed when stack gets its turn - used for defensive stance*/
|
||||
COMMANDER_KILLED = 512
|
||||
@ -373,7 +373,7 @@ struct DLL_LINKAGE Bonus : public std::enable_shared_from_this<Bonus>
|
||||
}
|
||||
static bool UntilBeingAttacked(const Bonus *hb)
|
||||
{
|
||||
return hb->duration & Bonus::UNITL_BEING_ATTACKED;
|
||||
return hb->duration & Bonus::UNTIL_BEING_ATTACKED;
|
||||
}
|
||||
static bool UntilCommanderKilled(const Bonus *hb)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user