Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spell and skill changes for boosting spells and skill, Re-enable morph, fix for energy worms #369

Merged
merged 8 commits into from
Oct 25, 2023
5 changes: 3 additions & 2 deletions vme/zone/basis.zon
Original file line number Diff line number Diff line change
Expand Up @@ -4038,8 +4038,9 @@ code
nCount := nCount + 1;
s := u.symname;

// Don't consume players or player's corpses :o)
if ((u.type == UNIT_ST_PC) or (s == "corpse@death"))
// Don't consume players, player's corpses, or containers :o)
if ((u.type == UNIT_ST_PC) or (s == "corpse@death") or ((u.type == UNIT_ST_OBJ) and (u.objecttype==ITEM_CONTAINER)))

{
u := u.next;
continue;
Expand Down
14 changes: 10 additions & 4 deletions vme/zone/newbie.zon
Original file line number Diff line number Diff line change
Expand Up @@ -742,10 +742,16 @@ block;

act("Magic Newbie guardians knock you unconscious.",
A_ALWAYS,self,null,activator,TO_VICT);
activator.position:=POSITION_STUNNED;
self.position:=POSITION_STANDING;
activator.hp:=0;
goto start;
if (activator.type ==UNIT_ST_NPC){
act("As $2n attacks $1n $2e is dissolved in a bright light.", A_SOMEONE, self, activator, null, TO_ROOM);
destroy(activator);
goto start;
} else {
activator.position:=POSITION_STUNNED;
self.position:=POSITION_STANDING;
activator.hp:=0;
goto start;
}
}
dilend

Expand Down
15 changes: 3 additions & 12 deletions vme/zone/rebirth.zon
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ code
}
dilend /* demon_special */

/*dilbegin aware recall dragon_special();
dilbegin aware recall dragon_special();

var
targ : unitptr;
Expand Down Expand Up @@ -889,7 +889,7 @@ code

goto start;
}
dilend dragon_special */
dilend /*dragon_special*/

dilbegin aware recall lion_special();

Expand Down Expand Up @@ -3191,7 +3191,7 @@ code
i := dildestroy ("vampire_special@rebirth", self);
i := dildestroy ("vampire_combat@rebirth", self);
i := dildestroy ("no_wear@rebirth", self);
i := dildestroy ("morph_commands@rebirth", self);
i := dildestroy ("d_commands@rebirth", self);

position_update(self);

Expand Down Expand Up @@ -3598,15 +3598,6 @@ var

code
{
/* rem out below to put back in */

act("Morph has been temporarily disabled due to problems " +
"with some morphs being unbalanced against others. " +
"As well as other issues. This will be fixed asap.",
A_ALWAYS, self, null, null, TO_CHAR);
subextra(self.extra, "$morphed");
quit;
//to here
if ((isset(self.pcflags, PC_PK_RELAXED)) and ("$Rebirth_Bob" in
self.quests))

Expand Down
40 changes: 32 additions & 8 deletions vme/zone/skills.zon
Original file line number Diff line number Diff line change
Expand Up @@ -12285,7 +12285,8 @@ dilend // defending
dilbegin ski_berserk(arg : string);
external
integer skillchecksa(skillidx : integer, abiidx : integer, difficulty : integer);

integer bonusCalc(hm : integer);
integer max@function(a:integer, b:integer);
var
heal : integer;
hm : integer;
Expand All @@ -12298,7 +12299,7 @@ code
As a result the character's Speed, HP, and CON are increased temporarily.
*/
tgt := self;

if ((self.type == UNIT_ST_PC) and (self.skills[SKI_BERSERK] <= 0))
{
act("You must practice first.", A_ALWAYS, self, null, null, TO_CHAR);
Expand Down Expand Up @@ -12327,8 +12328,7 @@ code
}
// Wrong, because NPC doesn't have SKI_BERSERK. hm := skillroll(self.abilities[ABIL_CON],30,self.skills[SKI_BERSERK],30);
hm := skillchecksa(SKI_BERSERK, ABIL_CON, 30);
if (hm > 10)
hm := 10;

if (hm <= 0)
{
act("<div class='spell'>You channel your energy, but fail to go berserk.</div>",
Expand All @@ -12339,21 +12339,23 @@ code
quit;
}

hm := bonusCalc(hm);

act("<div class='spell'>You channel your energy, and go berserk!</div>",
A_ALWAYS, self, null, tgt, TO_CHAR);
act("<div class='spell'>$1n channels their energy, and goes berserk!</div>",
A_SOMEONE, self, null, tgt, TO_REST);
if (isaff(tgt, ID_SPEED))
act("<div class='cpw'>Nothing happens.</div>",A_ALWAYS, self, null, tgt, TO_CHAR);
else
addaff(tgt, ID_BERSERK, 20, WAIT_SEC*30, +6, 0, 0, TIF_SPEED_BETTER, TIF_NONE, TIF_SPEED_WORSE, APF_SPEED);
addaff(tgt, ID_BERSERK, 20, WAIT_SEC*30, ABIL_CON, hm, 0, TIF_CON_INC, TIF_NONE, TIF_CON_DEC, APF_ABILITY);
addaff(tgt, ID_BERSERK, 20, WAIT_SEC*30, ABIL_HP, hm, 0, TIF_HIT_INC, TIF_NONE, TIF_HIT_DEC, APF_ABILITY);
addaff(tgt, ID_BERSERK, max@function(20,hm*2), WAIT_SEC*30, +6, 0, 0, TIF_SPEED_BETTER, TIF_NONE, TIF_SPEED_WORSE, APF_SPEED);
addaff(tgt, ID_BERSERK, max@function(20,hm*2), WAIT_SEC*30, ABIL_CON, hm, 0, TIF_CON_INC, TIF_NONE, TIF_CON_DEC, APF_ABILITY);
addaff(tgt, ID_BERSERK, max@function(20,hm*2), WAIT_SEC*30, ABIL_HP, hm, 0, TIF_HIT_INC, TIF_NONE, TIF_HIT_DEC, APF_ABILITY);
hm := hm * rnd(4,2);
if (hm > 20) hm := 20;
heal := tgt.hp + (hm * 3);
if (heal > tgt.max_hp) heal := tgt.max_hp;
tgt.endurance := tgt.endurance - 100;
tgt.endurance := tgt.endurance - (100 - (hm*2));
tgt.hp := heal;

send_done("berserk",self,null,tgt,hm,arg,null, CMD_AUTO_NONE);
Expand Down Expand Up @@ -13035,6 +13037,28 @@ code
dilend

/* END Barbarian Skills */

/*
New function for handling bonus calculations for skills.
Starts with the base (10) at 10 and adds anoth 1 for every 10 beyond that. This was derived
from the berserk skill calculation.
*/
dilbegin integer bonusCalc(hm : integer);

external
integer min@function(a:integer, b:integer);

code
{

if (hm>30)
return(10+((hm-30)/30)); // allows for numbers greater than 10 at intervals of 30 per increase
else
return(min@function(hm, 10));

}
dilend

%rooms
skill_room
title "The Skill Room"
Expand Down
Loading