mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Creatures now use SHOTS Bonus to express their total ammo count. Support for "additional shots" exp premy.
This commit is contained in:
parent
734c95959e
commit
3c5a0fd4ce
@ -315,8 +315,10 @@ void CCreatureWindow::showAll(SDL_Surface * to)
|
||||
|
||||
printLine(0, CGI->generaltexth->primarySkillNames[0], c->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::ATTACK), stackNode->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::ATTACK));
|
||||
printLine(1, CGI->generaltexth->primarySkillNames[1], c->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::DEFENSE), stackNode->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::DEFENSE));
|
||||
if(c->shots)
|
||||
printLine(2, CGI->generaltexth->allTexts[198], c->shots);
|
||||
//if(c->shots)
|
||||
// printLine(2, CGI->generaltexth->allTexts[198], c->shots);
|
||||
if(stackNode->valOfBonuses(Bonus::SHOTS))
|
||||
printLine(2, CGI->generaltexth->allTexts[198], stackNode->valOfBonuses(Bonus::SHOTS));
|
||||
|
||||
//TODO
|
||||
int dmgMultiply = 1;
|
||||
|
@ -2167,8 +2167,10 @@ void CCreInfoWindow::init(const CCreature *cre, const CBonusSystemNode *stackNod
|
||||
|
||||
printLine(0, CGI->generaltexth->primarySkillNames[0], cre->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::ATTACK), stackNode->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::ATTACK));
|
||||
printLine(1, CGI->generaltexth->primarySkillNames[1], cre->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::DEFENSE), stackNode->valOfBonuses(Bonus::PRIMARY_SKILL, PrimarySkill::DEFENSE));
|
||||
if(c->shots)
|
||||
printLine(2, CGI->generaltexth->allTexts[198], c->shots);
|
||||
//if(c->shots)
|
||||
// printLine(2, CGI->generaltexth->allTexts[198], c->shots);
|
||||
if(stackNode->valOfBonuses(Bonus::SHOTS))
|
||||
printLine(2, CGI->generaltexth->allTexts[198], stackNode->valOfBonuses(Bonus::SHOTS));
|
||||
|
||||
//TODO
|
||||
int dmgMultiply = 1;
|
||||
|
@ -1962,7 +1962,7 @@ void CStack::postInit()
|
||||
assert(parents.size());
|
||||
|
||||
firstHPleft = valOfBonuses(Bonus::STACK_HEALTH);
|
||||
shots = getCreature()->shots;
|
||||
shots = getCreature()->valOfBonuses(Bonus::SHOTS);
|
||||
counterAttacks = 1 + valOfBonuses(Bonus::ADDITIONAL_RETALIATION);
|
||||
state.insert(ALIVE); //alive state indication
|
||||
|
||||
|
@ -285,6 +285,7 @@ void CCreatureHandler::loadCreatures()
|
||||
ncre.addBonus(ncre.damageMax, Bonus::CREATURE_DAMAGE, 2);
|
||||
|
||||
ncre.shots = readNumber(befi, i, andame, buf);
|
||||
ncre.addBonus(ncre.shots, Bonus::SHOTS);
|
||||
ncre.spells = readNumber(befi, i, andame, buf);
|
||||
ncre.ammMin = readNumber(befi, i, andame, buf);
|
||||
ncre.ammMax = readNumber(befi, i, andame, buf);
|
||||
@ -831,6 +832,8 @@ void CCreatureHandler::loadStackExp(Bonus & b, BonusList & bl, std::string & src
|
||||
break;
|
||||
case 'S':
|
||||
b.type = Bonus::STACKS_SPEED; break;
|
||||
case 'O':
|
||||
b.type = Bonus::SHOTS; break;
|
||||
|
||||
case 'b':
|
||||
b.type = Bonus::ENEMY_DEFENCE_REDUCTION; break;
|
||||
|
@ -155,7 +155,8 @@ namespace PrimarySkill
|
||||
BONUS_NAME(SPECIAL_UPGRADE) /*val = base, additionalInfo = target */\
|
||||
BONUS_NAME(DRAGON_NATURE) \
|
||||
BONUS_NAME(CREATURE_DAMAGE)/*subtype 0 = both, 1 = min, 2 = max*/\
|
||||
BONUS_NAME(EXP_MULTIPLIER)/* val - percent of additional exp gained by stack/commander (base value 100)*/
|
||||
BONUS_NAME(EXP_MULTIPLIER)/* val - percent of additional exp gained by stack/commander (base value 100)*/\
|
||||
BONUS_NAME(SHOTS)
|
||||
|
||||
/// Struct for handling bonuses of several types. Can be transfered to any hero
|
||||
struct DLL_EXPORT Bonus
|
||||
|
Loading…
Reference in New Issue
Block a user