Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 3
Stats
Files
Topics
Posts
Members
Newest Member
481
3,733
19,360
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] Defensive shield spells...
Forum Rules | Mark all | Recent Posts

[Bug] Defensive shield spells delivering excessive damage to the attacker
< Newer Topic :: Older Topic > AFKMud 1.63

Pages:<< prev 1 next >>
Post is unread #1 May 9, 2004, 1:47 pm   Last edited Nov 13, 2005, 12:15 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Bug: Defensive shield spells are delivering excessive damage to the attacker.
Discovered in: AFKMud 1.63
Danger: Low - Simple data mismatch
Found by: Chrysaor
Fixed by: Chrysaor

fight.c, in one_hit, locate:

    if ( IS_AFFECTED( victim, AFF_BLADEBARRIER ) && !IS_AFFECTED( ch, AFF_BLADEBARRIER ) )
	retcode = damage(victim, ch, dam, skill_lookup( "blades" ));
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
	return retcode;

    if ( IS_AFFECTED( victim, AFF_FIRESHIELD ) && !IS_AFFECTED( ch, AFF_FIRESHIELD ) )
        retcode = damage(victim, ch, dam, skill_lookup( "flare" ));
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
        return retcode;
    
    if ( IS_AFFECTED( victim, AFF_ICESHIELD ) && !IS_AFFECTED( ch, AFF_ICESHIELD ) )
        retcode = damage(victim, ch, dam, skill_lookup( "iceshard" ));
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
        return retcode;
    
    if ( IS_AFFECTED( victim, AFF_SHOCKSHIELD ) && !IS_AFFECTED( ch, AFF_SHOCKSHIELD ) )
        retcode = damage(victim, ch, dam, skill_lookup( "torrent" ));
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
        return retcode;
    
    if ( IS_AFFECTED( victim, AFF_ACIDMIST ) && !IS_AFFECTED( ch, AFF_ACIDMIST ) )
  retcode = damage(victim, ch, dam, skill_lookup( "acidshot" ));
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
  return retcode;
 
    if ( IS_AFFECTED( victim, AFF_VENOMSHIELD ) && !IS_AFFECTED( ch, AFF_VENOMSHIELD ) )
         retcode = damage(victim, ch, dam, skill_lookup( "venomshot" ));
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
         return retcode;    


Replace with:

    if ( IS_AFFECTED( victim, AFF_BLADEBARRIER ) && !IS_AFFECTED( ch, AFF_BLADEBARRIER ) )
	retcode = spell_smaug( skill_lookup( "blades" ), victim->level, victim, ch );
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
	return retcode;

    if ( IS_AFFECTED( victim, AFF_FIRESHIELD ) && !IS_AFFECTED( ch, AFF_FIRESHIELD ) )
        retcode = spell_smaug( skill_lookup( "flare" ), victim->level, victim, ch );
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
        return retcode;
    
    if ( IS_AFFECTED( victim, AFF_ICESHIELD ) && !IS_AFFECTED( ch, AFF_ICESHIELD ) )
        retcode = spell_smaug( skill_lookup( "iceshard" ), victim->level, victim, ch );
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
        return retcode;
    
    if ( IS_AFFECTED( victim, AFF_SHOCKSHIELD ) && !IS_AFFECTED( ch, AFF_SHOCKSHIELD ) )
        retcode = spell_smaug( skill_lookup( "torrent" ), victim->level, victim, ch );
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
        return retcode;
    
    if ( IS_AFFECTED( victim, AFF_ACIDMIST ) && !IS_AFFECTED( ch, AFF_ACIDMIST ) )
  retcode = spell_smaug( skill_lookup( "acidshot" ), victim->level, victim, ch );
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
  return retcode;
 
    if ( IS_AFFECTED( victim, AFF_VENOMSHIELD ) && !IS_AFFECTED( ch, AFF_VENOMSHIELD ) )
         retcode = spell_smaug( skill_lookup( "venomshot" ), victim->level, victim, ch );
    if ( retcode != rNONE || char_died(ch) || char_died(victim) )
         return retcode;    


As described by Chrysaor, the damage function was taking the unaltered full damage the attacker did to the target and all of the defensive shield spells were reflecting the full amount back on them.

According to the helpfiles for the relevent spells, this should not have been the case. As described by the fireshield help:

Any person who attacks the caster will get a small fireball shot back at them if they hit the caster.


Reflecting back the full damage of the hit is hardly the definition of a "small" hit. The above fix will correct this and leaves the damage adjustment in the hands of the Smaugspell system now.
       
Pages:<< prev 1 next >>