It is currently Mon Dec 01, 2008 11:19 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: spell damage
PostPosted: Sat Sep 02, 2006 7:46 am 
Offline

Joined: Fri Apr 14, 2006 9:36 am
Posts: 240
Whewre do i find spell damage, i looked at the (spell).src files, but i found nothing


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 02, 2006 2:03 pm 
Offline
Certified POL Expert
User avatar

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 796
Location: Chicago, IL USA
depends on your scriptbase. Most of the time that is where the damage part is though, right in the spell scripts themselves.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 03, 2006 12:46 pm 
Offline
Certified POL Expert
User avatar

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1219
Location: Southern Central USA
Since this is the "General Help (095) forum I'll assume you're using 095 Distro.

Here are a few examples taken directly from the spell scripts showing the "Apply Damage" lines:

From clumsy.src starting at line 28:
Code:
  var magery := GetEffectiveSkill(caster, SKILLID_MAGERY);
  var mod_amount := Resisted(circle,caster,cast_on,(GetModAmount( magery )));
  var duration := GetModDuration( magery );
  DoTempMod(cast_on, "dex", 0 - mod_amount, duration); // Damage dealt here



From curse.src starting at line 20:
Code:
  var magery := GetEffectiveSkill(caster, SKILLID_MAGERY);
  var mod_amount := Resisted(circle,caster,cast_on,GetModAmount( magery ));
  var duration := GetModDuration( magery );
   SetObjProperty(cast_on, "LastHit", {caster.name,caster.serial, "curse" });
  if(Reflected(cast_on))
   cast_on := caster;
  endif
  if (CanMod(cast_on, "str"))
   DoTempMod(cast_on, "str", 0- mod_amount, duration); // Damage dealt here
  endif
  if (CanMod(cast_on, "dex"))
   DoTempMod(cast_on, "dex", 0- mod_amount, duration); // Damage dealt here
  endif
  if (CanMod(cast_on, "int"))
   DoTempMod(cast_on, "int", 0- mod_amount, duration); // Damage dealt here
  endif



From fireball.src starting at line 19:
Code:
  var dmg := RandomDiceRoll("3d6");
  SetObjProperty(cast_on, "LastHit", {caster.name, caster.serial, "fireball"});
  if(Reflected(cast_on))
    PlayMovingEffect(cast_on, caster, FX_FIREBALL, 5, 1);
    PlaySoundEffect(cast_on, 0x15f);
    cast_on := caster;
  endif
  if(GetHp(cast_on) > 1)
    if(cast_on.npctemplate)
      dmg := dmg * 2;
    endif
    ApplyRawDamage(cast_on, Resisted(circle,caster,cast_on, dmg)); // Damage dealt here
  endif



From lighting.src starting at line 17:
Code:
  var dmg := RandomDiceRoll("3d7");
  if (dmg < 1)
   dmg := 1;
  endif
  PlaySoundEffect(cast_on, SFX_SPELL_LIGHTNING);
  PlayLightningBoltEffect( cast_on);
  SetObjProperty(cast_on, "LastHit", {caster.name,caster.serial, "lightning bolt"});
  if(Reflected(cast_on))
   cast_on := caster;
    PlaySoundEffect(cast_on, SFX_SPELL_LIGHTNING);
    PlayLightningBoltEffect( cast_on);
  endif
  if(cast_on.isA(POLCLASS_NPC))
    dmg := dmg * 2;
  endif
  ApplyRawDamage(cast_on, Resisted(circle,caster,cast_on,dmg)); //damage dealt here



And finally from fstrike.src starting at line 17:
Code:
  var dmg := RandomDiceRoll("6d8");
  SetObjProperty(cast_on, "LastHit", {caster.name,caster.serial, "flame strike" });
  if (Reflected(cast_on))
   cast_on := caster;
  endif
  PlayObjectCenteredEffect(cast_on, 0x3709, 0x0a, 0x1e );
  PlaySoundEffect( caster, SFX_SPELL_FLAME_STRIKE );
  if(GetHp(cast_on) >= 1)
    if(cast_on.npctemplate)
      dmg := dmg * 2;
    endif
    ApplyRawDamage(cast_on, Resisted(circle,caster,cast_on,dmg)); //Damage dealt here
  endif


Just posting a few examples to show you the different ways damage can be applied. Some are using temporary mods for "damaging" vitals like mana or stamina and some use the ApplyDamage function to do HP damage.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 03, 2006 6:12 pm 
Offline

Joined: Fri Apr 14, 2006 9:36 am
Posts: 240
Ok, thanks for your help, and i realize you did answerr my question, so let me restate it, where do i find the poison damage?(Spell/weapon(skill))

thanks though


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 04, 2006 11:52 am 
Offline
Certified POL Expert
User avatar

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1219
Location: Southern Central USA
Are you asking about poison damage done by the poison spell or poison damage done by a poisoned weapon? The poison damage script is located in \pkg\spells. The info is passed to that script from the calling script in an array.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl