mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-15 11:46:56 +02:00
* minor fixes for revision 2193 (no shooting penalty bonus wasn't needed indeed but was poorly removed)
* minor changes
This commit is contained in:
parent
d2d5930b64
commit
c71127809e
@ -37,13 +37,6 @@ namespace phoenix = boost::phoenix;
|
|||||||
//actually these macros help in dealing with boost::variant
|
//actually these macros help in dealing with boost::variant
|
||||||
|
|
||||||
|
|
||||||
#define BEGIN_TYPE_CASE(LinePrinterVisitor) struct LinePrinterVisitor : boost::static_visitor<> \
|
|
||||||
{
|
|
||||||
|
|
||||||
#define FOR_TYPE(TYPE, VAR) void operator()(TYPE const& VAR) const
|
|
||||||
|
|
||||||
#define DO_TYPE_CASE(LinePrinterVisitor, VAR) } ___UN; boost::apply_visitor(___UN, VAR);
|
|
||||||
|
|
||||||
CERMPreprocessor::CERMPreprocessor(const std::string &Fname) : fname(Fname), file(Fname.c_str()), lineNo(0), version(INVALID)
|
CERMPreprocessor::CERMPreprocessor(const std::string &Fname) : fname(Fname), file(Fname.c_str()), lineNo(0), version(INVALID)
|
||||||
{
|
{
|
||||||
if(!file.is_open())
|
if(!file.is_open())
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
#include "ERMScriptModule.h"
|
#include "ERMScriptModule.h"
|
||||||
#include "ERMInterpreter.h"
|
#include "ERMInterpreter.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ERMScriptingModule.cpp, part of VCMI engine
|
||||||
|
*
|
||||||
|
* Authors: listed in file AUTHORS in main folder
|
||||||
|
*
|
||||||
|
* License: GNU General Public License v2.0 or later
|
||||||
|
* Full text of license available in license.txt file, in main folder
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
IGameEventRealizer *acb;
|
IGameEventRealizer *acb;
|
||||||
CPrivilagedInfoCallback *icb;
|
CPrivilagedInfoCallback *icb;
|
||||||
|
|
||||||
|
@ -1,5 +1,17 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../lib/CScriptingModule.h"
|
#include "../../lib/CScriptingModule.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ERMScriptingModule.cpp, part of VCMI engine
|
||||||
|
*
|
||||||
|
* Authors: listed in file AUTHORS in main folder
|
||||||
|
*
|
||||||
|
* License: GNU General Public License v2.0 or later
|
||||||
|
* Full text of license available in license.txt file, in main folder
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
extern IGameEventRealizer *acb;
|
extern IGameEventRealizer *acb;
|
||||||
extern CPrivilagedInfoCallback *icb;
|
extern CPrivilagedInfoCallback *icb;
|
@ -607,10 +607,11 @@ TDmgRange BattleInfo::calculateDmgRange( const CStack* attacker, const CStack* d
|
|||||||
};
|
};
|
||||||
|
|
||||||
//wall / distance penalty + advanced air shield
|
//wall / distance penalty + advanced air shield
|
||||||
if (shooting && !NBonus::hasOfType(attackerHero, Bonus::NO_DISTANCE_PENALTY) && (
|
bool distPenalty = !NBonus::hasOfType(attackerHero, Bonus::NO_DISTANCE_PENALTY) &&
|
||||||
hasDistancePenalty(attacker, defender->position) || hasWallPenalty(attacker, defender->position) ||
|
hasDistancePenalty(attacker, defender->position);
|
||||||
HLP::hasAdvancedAirShield(defender) )
|
bool obstaclePenalty = !NBonus::hasOfType(attackerHero, Bonus::NO_OBSTACLES_PENALTY) &&
|
||||||
)
|
hasWallPenalty(attacker, defender->position);
|
||||||
|
if (shooting && (distPenalty || obstaclePenalty || HLP::hasAdvancedAirShield(defender) ))
|
||||||
{
|
{
|
||||||
multBonus *= 0.5;
|
multBonus *= 0.5;
|
||||||
}
|
}
|
||||||
|
@ -736,6 +736,7 @@ void CArtHandler::addBonuses()
|
|||||||
|
|
||||||
//Bow of the Sharpshooter
|
//Bow of the Sharpshooter
|
||||||
giveArtBonus(137, Bonus::NO_DISTANCE_PENALTY, 0);
|
giveArtBonus(137, Bonus::NO_DISTANCE_PENALTY, 0);
|
||||||
|
giveArtBonus(137, Bonus::NO_OBSTACLES_PENALTY, 0);
|
||||||
giveArtBonus(137, Bonus::FREE_SHOOTING, 0);
|
giveArtBonus(137, Bonus::FREE_SHOOTING, 0);
|
||||||
|
|
||||||
//Wizard's Well
|
//Wizard's Well
|
||||||
|
@ -3,6 +3,17 @@
|
|||||||
#include <boost/filesystem.hpp> // includes all needed Boost.Filesystem declarations
|
#include <boost/filesystem.hpp> // includes all needed Boost.Filesystem declarations
|
||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CFileUtility.cpp, part of VCMI engine
|
||||||
|
*
|
||||||
|
* Authors: listed in file AUTHORS in main folder
|
||||||
|
*
|
||||||
|
* License: GNU General Public License v2.0 or later
|
||||||
|
* Full text of license available in license.txt file, in main folder
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = boost::filesystem;
|
||||||
|
|
||||||
CFileUtility::CFileUtility(void)
|
CFileUtility::CFileUtility(void)
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "../global.h"
|
#include "../global.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CFileUtility.cpp, part of VCMI engine
|
||||||
|
*
|
||||||
|
* Authors: listed in file AUTHORS in main folder
|
||||||
|
*
|
||||||
|
* License: GNU General Public License v2.0 or later
|
||||||
|
* Full text of license available in license.txt file, in main folder
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
/// Struct which stores name, date and a value which says if the file is located in LOD
|
/// Struct which stores name, date and a value which says if the file is located in LOD
|
||||||
struct FileInfo
|
struct FileInfo
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user