Back to the Korax Forum Archives
Crimson Wizard
RambOrc
Crimson Wizard
Firebrand
Crimson Wizard
Firebrand
Crimson Wizard
RambOrc
Crimson Wizard
RambOrc
Firebrand
Crimson Wizard
Firebrand
RambOrc
Crimson Wizard
Firebrand
RambOrc
Firebrand
Crimson Wizard
Firebrand
RambOrc
Crimson Wizard
RambOrc
Firebrand
RambOrc
Crimson Wizard
Crimson Wizard
SpellGoldenStorm SGS = SpellGoldenStorm(Level.Spawn(SpellGoldenStorm)); if (SGS) { SGS.AInstigator = self; SGS.Level = 7; SGS.LifeDuration = 24.0; SGS.Origin = Target.Origin; SGS.Target = Target; SGS.Activate(); }Here you may see that some standart properties of SpellInstance are set as well as some properties specific for that spell. (SpellGoldenStorm is not a direct child of SpellInstance, but a child of SpellPointBased; SpellPointBased is a child of SpelInstance and a parent for spells that are targetted somehow to some particular point of map or target actor's position)
Crimson Wizard
Actor(Owner.Player.MO).CastCondition( ACSpellBerserk, // condition class false, // not accumulative Actor(Owner.Player.MO), // instigator (caster) 1, // spell level (should be calculated somehow?) // duration (1.0 + itof(Player(Owner.Player).sp_power) * 80.0) / 35.0 );Along with Do, Activated and Deactivated methods, that can be useful for ActorCondition, it introduces couple of more methods that you may override in your spells. [u:156vf87z]CanBeCastUpon[/u:156vf87z] method makes a check if this AC can be cast on an actor given. When overriding yo may want to call parent's CanBeCastUpon before making any other checks and continue only if parent's returned TRUE (it checks actor's Health > 0). What else can be checked here? For example ACPoisoned has this check:
bool CanBeCastUpon(Actor recepient) { return recepient.Health > 0 && recepient.bLiving; }In other words it can be cast only on those actors with bLiving flag set. [u:156vf87z]Notify[/u:156vf87z] method can be important for some spells. It is called by actor to notify his Conditions about something happened. Commonly it notifies them about his own death. ACSpellManaBurn extends this method to damage actor only when he uses mana to attack:
switch (notification) { case ActorCondition::notify_ManaUsed: bDoDamage = true; AccumulatedDamage += param; break; default: ::Notify(notification, E, param); }
Firebrand