____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"
#include <stdio.h>
#include <stdlib.h>
#include "stratagus.h"
#include "video.h"
#include "unittype.h"
#include "animation.h"
#include "player.h"
#include "unit.h"
#include "missile.h"
#include "actions.h"
#include "pathfinder.h"
#include "sound.h"
#include "map.h"
#include "spells.h"
#include "interface.h"
Go to the source code of this file.
Functions | |
| static void | SpellMoveToTarget (CUnit *unit) |
| void | HandleActionSpellCast (CUnit *unit) |
Definition in file action_spellcast.cpp.
| void HandleActionSpellCast | ( | CUnit * | unit | ) |
Unit casts a spell!
| unit | Unit, for that the spell cast is handled. |
Definition at line 146 of file action_spellcast.cpp.
References _, CPlayer::AiEnabled, CUnit::Anim, CUnitType::Animations, CAnimations::Attack, CanCastSpell(), CUnit::ClearAction(), DebugPrint, INFINITE_RANGE, MANA_INDEX, SpellType::ManaCost, SpellType::Name, CUnitType::Name, NewResetPath, CPlayer::Notify(), NotifyYellow, NoUnitP, CUnit::Orders, CUnit::Player, CUnit::ReCast, SpellCast(), SpellMoveToTarget(), CUnit::SubAction, CUnit::Type, CUnit::_unit_anim_::Unbreakable, UnitActionDie, UnitShowAnimation(), CVariable::Value, CUnit::Variable, CUnit::Wait, CUnit::X, and CUnit::Y.
| static void SpellMoveToTarget | ( | CUnit * | unit | ) | [static] |
Handle moving to the target.
| unit | Unit, for that the spell cast is handled. |
Definition at line 90 of file action_spellcast.cpp.
References CUnit::Anim, Assert, CanMove(), CUnit::ClearAction(), CUnit::Destroyed, DoActionMove(), MapDistanceBetweenUnits(), MapDistanceToUnit(), NoUnitP, CUnit::Orders, PF_UNREACHABLE, CUnit::State, CUnit::SubAction, CUnitType::TileHeight, CUnitType::TileWidth, CUnit::Type, CUnit::_unit_anim_::Unbreakable, UnitHeadingFromDeltaXY(), CUnitType::Vanishes, CUnit::X, and CUnit::Y.
Referenced by HandleActionSpellCast().
1.5.6