1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

Typo: cast is an irregular verb.

This commit is contained in:
Frank Zago 2009-05-12 03:35:51 +00:00
parent 68d106ff1a
commit 788343dd1d
15 changed files with 38 additions and 38 deletions

View File

@ -159,9 +159,9 @@ void CGeniusAI::battleStackMoved(int ID, int dest, int distance, bool end)
/**
*
*/
void CGeniusAI::battleSpellCasted(SpellCasted *sc)
void CGeniusAI::battleSpellCast(SpellCast *sc)
{
MsgBox("\t\t\tCGeniusAI::battleSpellCasted");
MsgBox("\t\t\tCGeniusAI::battleSpellCast");
}
/**
* called when battlefield is prepared, prior the battle beginning

View File

@ -37,7 +37,7 @@ public:
virtual void battleEnd(BattleResult *br);
virtual void battleNewRound(int round); //called at the beggining of each turn, round=-1 is the tactic phase, round=0 is the first "normal" turn
virtual void battleStackMoved(int ID, int dest, int distance, bool end);
virtual void battleSpellCasted(SpellCasted *sc);
virtual void battleSpellCast(SpellCast *sc);
virtual void battleStart(CCreatureSet *army1, CCreatureSet *army2, int3 tile, CGHeroInstance *hero1, CGHeroInstance *hero2, bool side); //called by engine when battle starts; side=0 - left, side=1 - right
virtual void battlefieldPrepared(int battlefieldType, std::vector<CObstacle*> obstacles); //called when battlefield is prepared, prior the battle beginning
//

View File

@ -1790,7 +1790,7 @@ void CBattleInterface::battleFinished(const BattleResult& br)
LOCPLINT->pushInt(resWindow);
}
void CBattleInterface::spellCasted(SpellCasted * sc)
void CBattleInterface::spellCast(SpellCast * sc)
{
if(sc->side == !LOCPLINT->cb->battleGetStackByID(activeStack)->attackerOwned)
bSpell->block(true);
@ -1806,7 +1806,7 @@ void CBattleInterface::spellCasted(SpellCasted * sc)
}
case 16: //ice bolt
{
if(anims.size() == 0) //initialiaztion of anims
if(anims.size() == 0) //initialization of anims
{
anims.push_back("C08SPW0.DEF"); anims.push_back("C08SPW1.DEF"); anims.push_back("C08SPW2.DEF"); anims.push_back("C08SPW3.DEF"); anims.push_back("C08SPW4.DEF");
}

View File

@ -24,7 +24,7 @@ class AdventureMapButton;
class CHighlightableButton;
class CHighlightableButtonsGroup;
struct BattleResult;
struct SpellCasted;
struct SpellCast;
template <typename T> struct CondSh;
class CBattleInterface;
@ -177,7 +177,7 @@ private:
bool spellDestSelectMode; //if true, player is choosing destination for his spell
int spellSelMode; //0 - any location, 1 - any firendly creature, 2 - any hostile creature, 3 - any creature, 4 - obstacle, -1 - no location
BattleAction * spellToCast; //spell for which player is choosing destination
void endCastingSpell(); //ends casting spell (eg. when spell has been casted or cancelled)
void endCastingSpell(); //ends casting spell (eg. when spell has been cast or cancelled)
class CAttHelper
{
@ -288,7 +288,7 @@ public:
void hexLclicked(int whichOne); //hex only call-in
void stackIsShooting(int ID, int dest); //called when stack with id ID is shooting to hex dest
void battleFinished(const BattleResult& br); //called when battle is finished - battleresult window should be printed
void spellCasted(SpellCasted * sc); //called when a hero casts a spell
void spellCast(SpellCast * sc); //called when a hero casts a spell
void battleStacksEffectsSet(const SetStackEffect & sse); //called when a specific effect is set to stacks
void castThisSpell(int spellID); //called when player has chosen a spell from spellbook
void displayEffect(ui32 effect, int destTile); //displays effect of a spell on the battlefield; affected: true - attacker. false - defender

View File

@ -549,9 +549,9 @@ bool CCallback::battleCanCastSpell()
return false;
if(gs->curB->side1 == player)
return gs->curB->castedSpells[0] == 0 && gs->getHero(gs->curB->hero1)->getArt(17);
return gs->curB->castSpells[0] == 0 && gs->getHero(gs->curB->hero1)->getArt(17);
else
return gs->curB->castedSpells[1] == 0 && gs->getHero(gs->curB->hero2)->getArt(17);
return gs->curB->castSpells[1] == 0 && gs->getHero(gs->curB->hero2)->getArt(17);
}
void CCallback::swapGarrisonHero( const CGTownInstance *town )

View File

@ -33,7 +33,7 @@ class CArmedInstance;
struct BattleResult;
struct BattleAttack;
struct BattleStackAttacked;
struct SpellCasted;
struct SpellCast;
struct SetStackEffect;
struct HeroBonus;
struct PackageApplied;
@ -103,7 +103,7 @@ public:
virtual void battleEnd(BattleResult *br){};
virtual void battleNewRound(int round){}; //called at the beggining of each turn, round=-1 is the tactic phase, round=0 is the first "normal" turn
virtual void battleStackMoved(int ID, int dest, int distance, bool end){};
virtual void battleSpellCasted(SpellCasted *sc){};
virtual void battleSpellCast(SpellCast *sc){};
virtual void battleStacksEffectsSet(SetStackEffect & sse){};//called when a specific effect is set to stacks
virtual void battleStart(CCreatureSet *army1, CCreatureSet *army2, int3 tile, CGHeroInstance *hero1, CGHeroInstance *hero2, bool side){}; //called by engine when battle starts; side=0 - left, side=1 - right
virtual void battlefieldPrepared(int battlefieldType, std::vector<CObstacle*> obstacles){}; //called when battlefield is prepared, prior the battle beginning

View File

@ -117,12 +117,12 @@ struct DLL_EXPORT BattleInfo
CCreatureSet army1, army2;
std::vector<CStack*> stacks;
std::vector<CObstacleInstance> obstacles;
ui8 castedSpells[2]; //[0] - attacker, [1] - defender
ui8 castSpells[2]; //[0] - attacker, [1] - defender
template <typename Handler> void serialize(Handler &h, const int version)
{
h & side1 & side2 & round & activeStack & siege & tile & stacks & army1 & army2 & hero1 & hero2 & obstacles
& castedSpells;
& castSpells;
}
CStack * getNextStack(); //which stack will have turn after current one
std::vector<CStack> getStackQueue(); //returns stack in order of their movement action

View File

@ -2346,10 +2346,10 @@ void CPlayerInterface::battleStackMoved(int ID, int dest, int distance, bool end
boost::unique_lock<boost::recursive_mutex> un(*pim);
battleInt->stackMoved(ID, dest, end, distance);
}
void CPlayerInterface::battleSpellCasted(SpellCasted *sc)
void CPlayerInterface::battleSpellCast(SpellCast *sc)
{
boost::unique_lock<boost::recursive_mutex> un(*pim);
battleInt->spellCasted(sc);
battleInt->spellCast(sc);
}
void CPlayerInterface::battleStacksEffectsSet(SetStackEffect & sse)
{

View File

@ -617,7 +617,7 @@ public:
//void battleResultQuited();
void battleNewRound(int round); //called at the beggining of each turn, round=-1 is the tactic phase, round=0 is the first "normal" turn
void battleStackMoved(int ID, int dest, int distance, bool end);
void battleSpellCasted(SpellCasted *sc);
void battleSpellCast(SpellCast *sc);
void battleStacksEffectsSet(SetStackEffect & sse); //called when a specific effect is set to stacks
void battleStacksAttacked(std::set<BattleStackAttacked> & bsa);
void battleStart(CCreatureSet *army1, CCreatureSet *army2, int3 tile, CGHeroInstance *hero1, CGHeroInstance *hero2, bool side); //called by engine when battle starts; side=0 - left, side=1 - right

View File

@ -372,17 +372,17 @@ void StartAction::applyFirstCl( CClient *cl )
cl->playerint[GS(cl)->curB->side2]->actionStarted(&ba);
}
void SpellCasted::applyCl( CClient *cl )
void SpellCast::applyCl( CClient *cl )
{
if(cl->playerint.find(GS(cl)->curB->side1) != cl->playerint.end())
cl->playerint[GS(cl)->curB->side1]->battleSpellCasted(this);
cl->playerint[GS(cl)->curB->side1]->battleSpellCast(this);
if(cl->playerint.find(GS(cl)->curB->side2) != cl->playerint.end())
cl->playerint[GS(cl)->curB->side2]->battleSpellCasted(this);
cl->playerint[GS(cl)->curB->side2]->battleSpellCast(this);
}
void SetStackEffect::applyCl( CClient *cl )
{
SpellCasted sc;
SpellCast sc;
sc.id = effect.id;
sc.side = 3; //doesn't matter
sc.skill = effect.level;

View File

@ -264,7 +264,7 @@ public:
static int3 convertPosition(int3 src, bool toh3m); //toh3m=true: manifest->h3m; toh3m=false: h3m->manifest
double getHeroStrength() const;
int getTotalStrength() const;
ui8 getSpellSchoolLevel(const CSpell * spell) const; //returns level on which given spell would be casted by this hero
ui8 getSpellSchoolLevel(const CSpell * spell) const; //returns level on which given spell would be cast by this hero
bool canCastThisSpell(const CSpell * spell) const; //determines if this hero can cast given spell; takes into account existing spell in spellbook, existing spellbook and artifact bonuses
//////////////////////////////////////////////////////////////////////////

View File

@ -807,13 +807,13 @@ struct EndAction : public CPackForClient//3008
}
};
struct SpellCasted : public CPackForClient//3009
struct SpellCast : public CPackForClient//3009
{
SpellCasted(){type = 3009;};
SpellCast(){type = 3009;};
DLL_EXPORT void applyGs(CGameState *gs);
void applyCl(CClient *cl);
ui8 side; //which hero casted spell: 0 - attacker, 1 - defender
ui8 side; //which hero did cast spell: 0 - attacker, 1 - defender
ui32 id;
ui8 skill;
ui16 tile; //destination tile (may not be set in some global/mass spells

View File

@ -455,7 +455,7 @@ DLL_EXPORT void BattleStart::applyGs( CGameState *gs )
DLL_EXPORT void BattleNextRound::applyGs( CGameState *gs )
{
gs->curB->castedSpells[0] = gs->curB->castedSpells[1] = 0;
gs->curB->castSpells[0] = gs->curB->castSpells[1] = 0;
gs->curB->round = round;
BOOST_FOREACH(CStack *s, gs->curB->stacks)
@ -546,7 +546,7 @@ DLL_EXPORT void StartAction::applyGs( CGameState *gs )
}
}
DLL_EXPORT void SpellCasted::applyGs( CGameState *gs )
DLL_EXPORT void SpellCast::applyGs( CGameState *gs )
{
CGHeroInstance *h = (side) ? gs->getHero(gs->curB->hero2) : gs->getHero(gs->curB->hero1);
if(h)
@ -556,7 +556,7 @@ DLL_EXPORT void SpellCasted::applyGs( CGameState *gs )
}
if(side >= 0 && side < 2)
{
gs->curB->castedSpells[side]++;
gs->curB->castSpells[side]++;
}
if(gs->curB && id == 35) //dispel
{

View File

@ -89,7 +89,7 @@ void registerTypes2(Serializer &s)
s.template registerType<BattleAttack>();
s.template registerType<StartAction>();
s.template registerType<EndAction>();
s.template registerType<SpellCasted>();
s.template registerType<SpellCast>();
s.template registerType<SetStackEffect>();
s.template registerType<StacksInjured>();
s.template registerType<ShowInInfobox>();

View File

@ -2392,11 +2392,11 @@ bool CGameHandler::makeCustomAction( BattleAction &ba )
if( !(h->canCastThisSpell(s)) //hero cannot cast this spell at all
|| (h->mana < s->costs[skill]) //not enough mana
|| (ba.additionalInfo < 10) //it's adventure spell (not combat)
|| (gs->curB->castedSpells[ba.side]) //spell has been casted
|| (gs->curB->castSpells[ba.side]) //spell has been cast
|| (gs->battleMaxSpellLevel() < s->level) //non - casting hero stops caster from casting this spell
)
{
tlog2 << "Spell cannot be casted!\n";
tlog2 << "Spell cannot be cast!\n";
return false;
}
@ -2404,7 +2404,7 @@ bool CGameHandler::makeCustomAction( BattleAction &ba )
//TODO: check resistances
SpellCasted sc;
SpellCast sc;
sc.side = ba.side;
sc.id = ba.additionalInfo;
sc.skill = skill;