_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

action_upgradeto.cpp File Reference
#include "stratagus.h"
#include "action/action_upgradeto.h"
#include "ai.h"
#include "animation.h"
#include "iolib.h"
#include "map.h"
#include "player.h"
#include "script.h"
#include "spells.h"
#include "translate.h"
#include "unit.h"
#include "unittype.h"

action_upgradeto.cpp - The unit upgrading to new action.

#define CancelUpgradeCostsFactor   100
 How many resources the player gets back if canceling upgrade. More...
 
static int TransformUnitIntoType (CUnit &unit, const CUnitType &newtype)
 
static void AnimateActionUpgradeTo (CUnit &unit)
 

Macro Definition Documentation

◆ CancelUpgradeCostsFactor

#define CancelUpgradeCostsFactor   100

How many resources the player gets back if canceling upgrade.

Function Documentation

◆ AnimateActionUpgradeTo()

static void AnimateActionUpgradeTo ( CUnit unit)
static

◆ TransformUnitIntoType()

static int TransformUnitIntoType ( CUnit unit,
const CUnitType newtype 
)
static

Transform a unit in another.

Parameters
unitunit to transform.
newtypenew type of the unit.
Returns
0 on error, 1 if nothing happens, 2 else.
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.