mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-14 10:12:59 +02:00
Merge pull request #4819 from Laserlicht/mechanical_bonus
added MECHANICAL bonus
This commit is contained in:
commit
42dcb21e45
@ -707,6 +707,8 @@
|
||||
"core.bonus.DISINTEGRATE.description": "No corpse remains after death",
|
||||
"core.bonus.INVINCIBLE.name": "Invincible",
|
||||
"core.bonus.INVINCIBLE.description": "Cannot be affected by anything",
|
||||
"core.bonus.MECHANICAL.name": "Mechanical",
|
||||
"core.bonus.MECHANICAL.description": "Immunity to many effects, repairable",
|
||||
"core.bonus.PRISM_HEX_ATTACK_BREATH.name": "Prism Breath",
|
||||
"core.bonus.PRISM_HEX_ATTACK_BREATH.description": "Prism Breath Attack (three directions)"
|
||||
}
|
||||
|
@ -573,7 +573,8 @@ void MoraleLuckBox::set(const AFactionMember * node)
|
||||
boost::algorithm::replace_first(text,"%s",CGI->generaltexth->arraytxt[neutralDescr[morale]-mrlt]);
|
||||
|
||||
if (morale && node && (node->getBonusBearer()->hasBonusOfType(BonusType::UNDEAD)
|
||||
|| node->getBonusBearer()->hasBonusOfType(BonusType::NON_LIVING)))
|
||||
|| node->getBonusBearer()->hasBonusOfType(BonusType::NON_LIVING)
|
||||
|| node->getBonusBearer()->hasBonusOfType(BonusType::MECHANICAL)))
|
||||
{
|
||||
text += CGI->generaltexth->arraytxt[113]; //unaffected by morale
|
||||
component.value = 0;
|
||||
|
@ -1995,6 +1995,10 @@
|
||||
"type" : "HAS_ANOTHER_BONUS_LIMITER",
|
||||
"parameters" : [ "NON_LIVING" ]
|
||||
},
|
||||
{
|
||||
"type" : "HAS_ANOTHER_BONUS_LIMITER",
|
||||
"parameters" : [ "MECHANICAL" ]
|
||||
},
|
||||
{
|
||||
"type" : "HAS_ANOTHER_BONUS_LIMITER",
|
||||
"parameters" : [ "GARGOYLE" ]
|
||||
@ -2016,6 +2020,10 @@
|
||||
"type" : "HAS_ANOTHER_BONUS_LIMITER",
|
||||
"parameters" : [ "NON_LIVING" ]
|
||||
},
|
||||
{
|
||||
"type" : "HAS_ANOTHER_BONUS_LIMITER",
|
||||
"parameters" : [ "MECHANICAL" ]
|
||||
},
|
||||
{
|
||||
"type" : "HAS_ANOTHER_BONUS_LIMITER",
|
||||
"parameters" : [ "GARGOYLE" ]
|
||||
|
@ -399,6 +399,14 @@
|
||||
}
|
||||
},
|
||||
|
||||
"MECHANICAL":
|
||||
{
|
||||
"graphics":
|
||||
{
|
||||
"icon": "zvs/Lib1.res/Mechanical"
|
||||
}
|
||||
},
|
||||
|
||||
"RANDOM_SPELLCASTER":
|
||||
{
|
||||
"graphics":
|
||||
|
@ -88,6 +88,7 @@
|
||||
"targetCondition" : {
|
||||
"noneOf" : {
|
||||
"bonus.NON_LIVING" : "absolute",
|
||||
"bonus.MECHANICAL" : "absolute",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute",
|
||||
"bonus.GARGOYLE" : "absolute"
|
||||
@ -159,6 +160,7 @@
|
||||
"targetCondition" : {
|
||||
"noneOf" : {
|
||||
"bonus.NON_LIVING" : "normal",
|
||||
"bonus.MECHANICAL" : "normal",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "normal"
|
||||
}
|
||||
@ -238,6 +240,7 @@
|
||||
"targetCondition" : {
|
||||
"noneOf" : {
|
||||
"bonus.NON_LIVING" : "absolute",
|
||||
"bonus.MECHANICAL" : "absolute",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute",
|
||||
"bonus.GARGOYLE" : "absolute"
|
||||
@ -270,6 +273,7 @@
|
||||
"targetCondition" : {
|
||||
"noneOf" : {
|
||||
"bonus.NON_LIVING" : "absolute",
|
||||
"bonus.MECHANICAL" : "absolute",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute",
|
||||
"bonus.GARGOYLE" : "absolute"
|
||||
@ -357,6 +361,7 @@
|
||||
"targetCondition" : {
|
||||
"noneOf" : {
|
||||
"bonus.NON_LIVING" : "absolute",
|
||||
"bonus.MECHANICAL" : "absolute",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute",
|
||||
"bonus.GARGOYLE" : "absolute"
|
||||
|
@ -531,6 +531,7 @@
|
||||
"targetCondition" : {
|
||||
"noneOf" : {
|
||||
"bonus.NON_LIVING" : "absolute",
|
||||
"bonus.MECHANICAL" : "absolute",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute",
|
||||
"bonus.GARGOYLE" : "absolute"
|
||||
@ -602,6 +603,7 @@
|
||||
"targetCondition" : {
|
||||
"noneOf" : {
|
||||
"bonus.NON_LIVING" : "absolute",
|
||||
"bonus.MECHANICAL" : "absolute",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute",
|
||||
"bonus.GARGOYLE" : "absolute"
|
||||
|
@ -806,6 +806,7 @@
|
||||
"noneOf" : {
|
||||
"bonus.MIND_IMMUNITY" : "normal",
|
||||
"bonus.NON_LIVING" : "normal",
|
||||
"bonus.MECHANICAL" : "normal",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute"
|
||||
}
|
||||
@ -859,6 +860,7 @@
|
||||
"noneOf" : {
|
||||
"bonus.MIND_IMMUNITY" : "normal",
|
||||
"bonus.NON_LIVING" : "normal",
|
||||
"bonus.MECHANICAL" : "normal",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute"
|
||||
}
|
||||
@ -1155,6 +1157,7 @@
|
||||
"noneOf" : {
|
||||
"bonus.MIND_IMMUNITY" : "absolute",
|
||||
"bonus.NON_LIVING" : "absolute",
|
||||
"bonus.MECHANICAL" : "absolute",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute"
|
||||
}
|
||||
@ -1245,6 +1248,7 @@
|
||||
"noneOf" : {
|
||||
"bonus.MIND_IMMUNITY" : "normal",
|
||||
"bonus.NON_LIVING" : "normal",
|
||||
"bonus.MECHANICAL" : "normal",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "normal"
|
||||
}
|
||||
@ -1311,7 +1315,8 @@
|
||||
"bonus.SIEGE_WEAPON":"absolute",
|
||||
"bonus.MIND_IMMUNITY":"normal",
|
||||
"bonus.UNDEAD":"normal",
|
||||
"bonus.NON_LIVING":"normal"
|
||||
"bonus.NON_LIVING":"normal",
|
||||
"bonus.MECHANICAL":"normal"
|
||||
}
|
||||
},
|
||||
"flags" : {
|
||||
@ -1379,6 +1384,7 @@
|
||||
"noneOf" : {
|
||||
"bonus.MIND_IMMUNITY" : "normal",
|
||||
"bonus.NON_LIVING" : "normal",
|
||||
"bonus.MECHANICAL" : "normal",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "normal"
|
||||
}
|
||||
@ -1437,6 +1443,7 @@
|
||||
"noneOf" : {
|
||||
"bonus.MIND_IMMUNITY" : "normal",
|
||||
"bonus.NON_LIVING" : "normal",
|
||||
"bonus.MECHANICAL" : "normal",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute"
|
||||
}
|
||||
|
@ -41,6 +41,7 @@
|
||||
"targetCondition" : {
|
||||
"noneOf" : {
|
||||
"bonus.NON_LIVING" : "absolute",
|
||||
"bonus.MECHANICAL" : "absolute",
|
||||
"bonus.SIEGE_WEAPON" : "absolute",
|
||||
"bonus.UNDEAD" : "absolute",
|
||||
"bonus.GARGOYLE" : "absolute"
|
||||
|
@ -402,6 +402,10 @@ Increases starting amount of shots that unit has in battle
|
||||
|
||||
Affected unit is considered to not be alive and not affected by morale and certain spells
|
||||
|
||||
### MECHANICAL
|
||||
|
||||
Affected unit is considered to not be alive and not affected by morale and certain spells but should be repairable from engineers (factory).
|
||||
|
||||
### GARGOYLE
|
||||
|
||||
Affected unit is considered to be a gargoyle and not affected by certain spells
|
||||
|
@ -102,7 +102,7 @@ int AFactionMember::moraleValAndBonusList(TConstBonusListPtr & bonusList) const
|
||||
return maxGoodMorale;
|
||||
}
|
||||
|
||||
static const auto unaffectedByMoraleSelector = Selector::type()(BonusType::NON_LIVING).Or(Selector::type()(BonusType::UNDEAD))
|
||||
static const auto unaffectedByMoraleSelector = Selector::type()(BonusType::NON_LIVING).Or(Selector::type()(BonusType::MECHANICAL)).Or(Selector::type()(BonusType::UNDEAD))
|
||||
.Or(Selector::type()(BonusType::SIEGE_WEAPON)).Or(Selector::type()(BonusType::NO_MORALE));
|
||||
|
||||
static const std::string cachingStrUn = "AFactionMember::unaffectedByMoraleSelector";
|
||||
@ -187,6 +187,7 @@ bool ACreature::isLiving() const //TODO: theoreticaly there exists "LIVING" bonu
|
||||
static const std::string cachingStr = "ACreature::isLiving";
|
||||
static const CSelector selector = Selector::type()(BonusType::UNDEAD)
|
||||
.Or(Selector::type()(BonusType::NON_LIVING))
|
||||
.Or(Selector::type()(BonusType::MECHANICAL))
|
||||
.Or(Selector::type()(BonusType::GARGOYLE))
|
||||
.Or(Selector::type()(BonusType::SIEGE_WEAPON));
|
||||
|
||||
|
@ -180,6 +180,7 @@ class JsonNode;
|
||||
BONUS_NAME(RESOURCES_TOWN_MULTIPLYING_BOOST) /*Bonus that does not account for propagation and gives extra resources per day with amount multiplied by number of owned towns. val - base resource amount to be multiplied times number of owned towns, subtype - resource type*/ \
|
||||
BONUS_NAME(DISINTEGRATE) /* after death no corpse remains */ \
|
||||
BONUS_NAME(INVINCIBLE) /* cannot be target of attacks or spells */ \
|
||||
BONUS_NAME(MECHANICAL) /*eg. factory creatures, cannot be rised or healed, only neutral morale, repairable by engineer */ \
|
||||
BONUS_NAME(PRISM_HEX_ATTACK_BREATH) /*eg. dragons*/ \
|
||||
/* end of list */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user