____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       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"

Capture Class Reference

#include <spells.h>

Inheritance diagram for Capture:

SpellActionType

List of all members.

Public Member Functions

 Capture ()
virtual int Cast (CUnit *caster, const SpellType *spell, CUnit *target, int x, int y)

Public Attributes

char SacrificeEnable
 true if the caster dies after casting.
int Damage
 damage the spell does if unable to caputre
int DamagePercent


Detailed Description

Definition at line 242 of file spells.h.


Constructor & Destructor Documentation

Capture::Capture (  )  [inline]

Definition at line 244 of file spells.h.


Member Function Documentation

int Capture::Cast ( CUnit caster,
const SpellType spell,
CUnit target,
int  x,
int  y 
) [virtual]

Cast capture.

Parameters:
caster Unit that casts the spell
spell Spell-type pointer
target Target unit that spell is addressed to
x X coord of target spot when/if target does not exist
y Y coord of target spot when/if target does not exist
Returns:
=!0 if spell should be repeated, 0 if not

Implements SpellActionType.

Definition at line 579 of file spells.cpp.

References CUnitType::Building, CUnit::ChangeOwner(), Damage, DamagePercent, CVariable::Enable, HitUnit(), HP_INDEX, CUnit::IsEnemy(), KILL_INDEX, MANA_INDEX, SpellType::ManaCost, CVariable::Max, CUnit::Player, CUnitType::Points, CUnit::Remove(), SacrificeEnable, CPlayer::Score, CPlayer::TotalKills, CPlayer::TotalRazings, CUnit::Type, UnitClearOrders(), UnitLost(), CVariable::Value, and CUnit::Variable.


Member Data Documentation

true if the caster dies after casting.

Definition at line 248 of file spells.h.

Referenced by Cast(), and CclSpellAction().

damage the spell does if unable to caputre

Definition at line 249 of file spells.h.

Referenced by Cast(), and CclSpellAction().

percent the target must be damaged for a capture to suceed.

Definition at line 250 of file spells.h.

Referenced by Cast(), and CclSpellAction().


The documentation for this class was generated from the following files:

Generated on Sat Feb 21 00:28:23 2009 for Bos Wars by  doxygen 1.5.6