Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot, Yahoo!

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
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,639
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 >>