mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-05 15:05:40 +02:00
commit
e42285c2f1
@ -32,7 +32,7 @@ struct SlotInfo
|
||||
struct ArmyUpgradeInfo
|
||||
{
|
||||
std::vector<SlotInfo> resultingArmy;
|
||||
uint64_t upgradeValue = 0;
|
||||
int64_t upgradeValue = 0;
|
||||
TResources upgradeCost;
|
||||
|
||||
void addArmyToBuy(std::vector<SlotInfo> army);
|
||||
|
@ -444,6 +444,8 @@ void AdventureMapInterface::onPlayerTurnStarted(PlayerColor playerID)
|
||||
LOCPLINT->localState->setSelection(LOCPLINT->localState->getWanderingHero(0));
|
||||
}
|
||||
|
||||
centerOnObject(LOCPLINT->localState->getCurrentArmy());
|
||||
|
||||
//show new day animation and sound on infobar, except for 1st day of the game
|
||||
if (LOCPLINT->cb->getDate(Date::DAY) != 1)
|
||||
widget->getInfoBar()->showDate();
|
||||
|
@ -252,7 +252,7 @@ Gives creature under effect of this spell additional bonus, which is hardcoded a
|
||||
|
||||
### SPECIAL_ADD_VALUE_ENCHANT
|
||||
|
||||
Increased effect of spell affecting creature, ie. Aenain makes Disrupting Ray decrease target's defense by additional 2 points:
|
||||
Modifies 'val' parameter of spell effects that give bonuses by specified value. For example, Aenain makes Disrupting Ray decrease target's defense by additional 2 points:
|
||||
|
||||
```jsonc
|
||||
"disruptingRay" : {
|
||||
@ -263,11 +263,11 @@ Increased effect of spell affecting creature, ie. Aenain makes Disrupting Ray de
|
||||
```
|
||||
|
||||
- subtype: affected spell identifier
|
||||
- additionalInfo: value to add
|
||||
- addInfo: value to modify 'val' parameter of targeted spell effects by
|
||||
|
||||
### SPECIAL_FIXED_VALUE_ENCHANT
|
||||
|
||||
Spell affecting creature has fixed effect, eg. hero Melody has constant spell effect of +3:
|
||||
Changes 'val' parameter of spell effects that give bonuses to a specified value. For example, Fortune cast by Melody always modifies luck by +3:
|
||||
|
||||
```jsonc
|
||||
"fortune" : {
|
||||
@ -278,7 +278,7 @@ Spell affecting creature has fixed effect, eg. hero Melody has constant spell ef
|
||||
```
|
||||
|
||||
- subtype: affected spell identifier
|
||||
- additionalInfo = fixed value
|
||||
- addInfo: value to set 'val' parameter of targeted spell effects to
|
||||
|
||||
### SPECIAL_UPGRADE
|
||||
|
||||
|
@ -196,7 +196,7 @@ std::shared_ptr<Bonus> OwnerUpdater::createUpdatedBonus(const std::shared_ptr<Bo
|
||||
owner = PlayerColor::NEUTRAL;
|
||||
|
||||
std::shared_ptr<Bonus> updated =
|
||||
std::make_shared<Bonus>(b->duration, b->type, b->source, b->val, b->sid, b->subtype, b->valType);
|
||||
std::make_shared<Bonus>(*b);
|
||||
updated->limiter = std::make_shared<OppositeSideLimiter>(owner);
|
||||
return updated;
|
||||
}
|
||||
|
@ -2416,7 +2416,7 @@ void CatapultAttack::applyBattle(IBattleState * battleState)
|
||||
|
||||
void BattleSetStackProperty::applyGs(CGameState * gs) const
|
||||
{
|
||||
CStack * stack = gs->getBattle(battleID)->getStack(stackID);
|
||||
CStack * stack = gs->getBattle(battleID)->getStack(stackID, false);
|
||||
switch(which)
|
||||
{
|
||||
case CASTS:
|
||||
|
@ -441,6 +441,11 @@ void CGameHandler::changeSecSkill(const CGHeroInstance * hero, SecondarySkill wh
|
||||
|
||||
if (hero->visitedTown)
|
||||
giveSpells(hero->visitedTown, hero);
|
||||
|
||||
// Our scouting range may have changed - update it
|
||||
if (hero->getOwner().isValidPlayer())
|
||||
changeFogOfWar(hero->getSightCenter(), hero->getSightRadius(), hero->getOwner(), ETileVisibility::REVEALED);
|
||||
|
||||
}
|
||||
|
||||
void CGameHandler::handleClientDisconnection(std::shared_ptr<CConnection> c)
|
||||
@ -4293,6 +4298,9 @@ void CGameHandler::changeFogOfWar(int3 center, ui32 radius, PlayerColor player,
|
||||
|
||||
void CGameHandler::changeFogOfWar(std::unordered_set<int3> &tiles, PlayerColor player, ETileVisibility mode)
|
||||
{
|
||||
if (tiles.empty())
|
||||
return;
|
||||
|
||||
FoWChange fow;
|
||||
fow.tiles = tiles;
|
||||
fow.player = player;
|
||||
|
@ -177,13 +177,16 @@ bool TurnOrderProcessor::computeCanActSimultaneously(PlayerColor active, PlayerC
|
||||
assert(activeInfo);
|
||||
assert(waitingInfo);
|
||||
|
||||
if (gameHandler->hasBothPlayersAtSameConnection(active, waiting))
|
||||
if (activeInfo->human != waitingInfo->human)
|
||||
{
|
||||
// only one AI and one human can play simultaneoulsy from single connection
|
||||
if (!gameHandler->getStartInfo()->simturnsInfo.allowHumanWithAI)
|
||||
return false;
|
||||
|
||||
// only one AI and one human can play simultaneoulsy from single connection
|
||||
if (activeInfo->human == waitingInfo->human)
|
||||
}
|
||||
else
|
||||
{
|
||||
// two AI or two humans in hotseat can't play at the same time
|
||||
if (gameHandler->hasBothPlayersAtSameConnection(active, waiting))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user