Hi, all
I'm interested in adding a sustain spell to the code. The spell should fill a person up, and prevent them from getting hungry or thirsty for its duration. Unfortunately, the mental-state stuff isn't quite clear to me yet.
The changes I have made so far are outlined below. It doesn't seem to be working. A hungry character, after being sustained, remains hungry (and possibly gets more hungry). The spell, when cast, shows up under aff but not aff by (unlike the sanctuary affect I modeled it after). Any help would be warmly appreciated.
Here is what I have done so far...
to Mud.h - added:
AFF_SUSTAIN
to the affected_by_types enum in mud.h
to char_update in update.c, inside the if ( !IS_NPC(ch) && ch->level < LEVEL_IMMORTAL ) condition:
if ( IS_AFFECTED(ch, AFF_SUSTAIN) )
{
if(ch->pcdata->condition[COND_THIRST] < 20)
{
gain_condition( ch, COND_THIRST, 20);
}
if(ch->pcdata->condition[COND_FULL] < 20)
{
gain_condition( ch, COND_FULL, 20);
}
}
and added to skills.dat:
#SKILL
Name sustain~
Type Spell
Info 0
Flags 0
Target 2
Minpos 112
Slot 36
Mana 15
Rounds 12
Code spell_smaug
Dammsg ~
Wearoff sustain wears off.~
Hitchar $N appears satiated.~
Hitvict You feel sustained.~
Hitroom $N appears satiated.~
Affect '(l*10)' 26 'sustain' 37
Minlevel 13
End
I'm interested in adding a sustain spell to the code. The spell should fill a person up, and prevent them from getting hungry or thirsty for its duration. Unfortunately, the mental-state stuff isn't quite clear to me yet.
The changes I have made so far are outlined below. It doesn't seem to be working. A hungry character, after being sustained, remains hungry (and possibly gets more hungry). The spell, when cast, shows up under aff but not aff by (unlike the sanctuary affect I modeled it after). Any help would be warmly appreciated.
Here is what I have done so far...
to Mud.h - added:
AFF_SUSTAIN
to the affected_by_types enum in mud.h
to char_update in update.c, inside the if ( !IS_NPC(ch) && ch->level < LEVEL_IMMORTAL ) condition:
if ( IS_AFFECTED(ch, AFF_SUSTAIN) )
{
if(ch->pcdata->condition[COND_THIRST] < 20)
{
gain_condition( ch, COND_THIRST, 20);
}
if(ch->pcdata->condition[COND_FULL] < 20)
{
gain_condition( ch, COND_FULL, 20);
}
}
and added to skills.dat:
#SKILL
Name sustain~
Type Spell
Info 0
Flags 0
Target 2
Minpos 112
Slot 36
Mana 15
Rounds 12
Code spell_smaug
Dammsg ~
Wearoff sustain wears off.~
Hitchar $N appears satiated.~
Hitvict You feel sustained.~
Hitroom $N appears satiated.~
Affect '(l*10)' 26 'sustain' 37
Minlevel 13
End