diff --git a/Scripting/ERM/ERMParser.cpp b/Scripting/ERM/ERMParser.cpp index f9103f4bf..8f776104b 100644 --- a/Scripting/ERM/ERMParser.cpp +++ b/Scripting/ERM/ERMParser.cpp @@ -37,13 +37,6 @@ namespace phoenix = boost::phoenix; //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) { if(!file.is_open()) diff --git a/Scripting/ERM/ERMScriptModule.cpp b/Scripting/ERM/ERMScriptModule.cpp index 45b0a811d..8954a4fbb 100644 --- a/Scripting/ERM/ERMScriptModule.cpp +++ b/Scripting/ERM/ERMScriptModule.cpp @@ -1,6 +1,16 @@ #include "ERMScriptModule.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; CPrivilagedInfoCallback *icb; diff --git a/Scripting/ERM/ERMScriptModule.h b/Scripting/ERM/ERMScriptModule.h index bb292a6a9..63002b2a7 100644 --- a/Scripting/ERM/ERMScriptModule.h +++ b/Scripting/ERM/ERMScriptModule.h @@ -1,5 +1,17 @@ #pragma once #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 CPrivilagedInfoCallback *icb; \ No newline at end of file diff --git a/lib/BattleState.cpp b/lib/BattleState.cpp index 2879d1151..c4b5ddcbf 100644 --- a/lib/BattleState.cpp +++ b/lib/BattleState.cpp @@ -607,10 +607,11 @@ TDmgRange BattleInfo::calculateDmgRange( const CStack* attacker, const CStack* d }; //wall / distance penalty + advanced air shield - if (shooting && !NBonus::hasOfType(attackerHero, Bonus::NO_DISTANCE_PENALTY) && ( - hasDistancePenalty(attacker, defender->position) || hasWallPenalty(attacker, defender->position) || - HLP::hasAdvancedAirShield(defender) ) - ) + bool distPenalty = !NBonus::hasOfType(attackerHero, Bonus::NO_DISTANCE_PENALTY) && + hasDistancePenalty(attacker, defender->position); + bool obstaclePenalty = !NBonus::hasOfType(attackerHero, Bonus::NO_OBSTACLES_PENALTY) && + hasWallPenalty(attacker, defender->position); + if (shooting && (distPenalty || obstaclePenalty || HLP::hasAdvancedAirShield(defender) )) { multBonus *= 0.5; } diff --git a/lib/CArtHandler.cpp b/lib/CArtHandler.cpp index e105a9155..1675ccd64 100644 --- a/lib/CArtHandler.cpp +++ b/lib/CArtHandler.cpp @@ -736,6 +736,7 @@ void CArtHandler::addBonuses() //Bow of the Sharpshooter giveArtBonus(137, Bonus::NO_DISTANCE_PENALTY, 0); + giveArtBonus(137, Bonus::NO_OBSTACLES_PENALTY, 0); giveArtBonus(137, Bonus::FREE_SHOOTING, 0); //Wizard's Well diff --git a/lib/CFileUtility.cpp b/lib/CFileUtility.cpp index e343fee53..3d7022290 100644 --- a/lib/CFileUtility.cpp +++ b/lib/CFileUtility.cpp @@ -3,6 +3,17 @@ #include // includes all needed Boost.Filesystem declarations #include +/* + * 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; CFileUtility::CFileUtility(void) diff --git a/lib/CFileUtility.h b/lib/CFileUtility.h index 168d941f9..063040a7a 100644 --- a/lib/CFileUtility.h +++ b/lib/CFileUtility.h @@ -1,6 +1,16 @@ #pragma once #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 FileInfo {