mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +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:
		| @@ -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()) | ||||
|   | ||||
| @@ -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; | ||||
|  | ||||
|   | ||||
| @@ -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; | ||||
| @@ -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; | ||||
| 	} | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -3,6 +3,17 @@ | ||||
| #include <boost/filesystem.hpp>   // includes all needed Boost.Filesystem declarations | ||||
| #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; | ||||
|  | ||||
| CFileUtility::CFileUtility(void) | ||||
|   | ||||
| @@ -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 | ||||
| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user