Skip to content

Commit

Permalink
- Gauntlet tweaks :V
Browse files Browse the repository at this point in the history
  • Loading branch information
LordMisfit committed Oct 17, 2017
1 parent 6f18d99 commit fe1d24f
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 112 deletions.
Binary file modified acs/spelllib.o
Binary file not shown.
1 change: 0 additions & 1 deletion decorate/Players.dec
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ actor FloraBriscoletti : AetheriusPlayerPawn // DoomPlayer // PlayerPawn
NERA A 6 BRIGHT
Goto Missile
Pain:
NERA A 0 ACS_NamedExecuteAlways("CursedShieldPain",0,1,0,0)
NERA A 4
NERA A 4 ACS_NamedExecuteAlways("FloraPainScreams") // A_Pain
Goto Spawn
Expand Down
39 changes: 3 additions & 36 deletions decorate/WeaponsAmmo.dec
Original file line number Diff line number Diff line change
Expand Up @@ -876,18 +876,7 @@ actor FistDeggaris : MarineWeapon
MPU0 D 1 { if (ACS_NamedExecuteWithResult("MiscVarCheckDECORATE",10051) >= 3) { A_SetTics(0); } }
MPU0 E 1
{
if (random(1,256) > 64)
{
A_GiveInventory("UppercutATKBonus1",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutDEFBonus1",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutCritBonus1",1,AAPTR_PLAYER1);
}
else
{
A_GiveInventory("UppercutATKBonus2",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutDEFBonus2",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutCritBonus2",1,AAPTR_PLAYER1);
}
A_UppercutBonus;
}
MPU1 A 1
{
Expand Down Expand Up @@ -1434,18 +1423,7 @@ actor FistIllucia : MarineWeapon
MPU2 E 1
{
if (ACS_NamedExecuteWithResult("MiscVarCheckDECORATE",10051) >= 3) { A_SetTics(0); }
if (random(1,256) > 64)
{
A_GiveInventory("UppercutATKBonus1",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutDEFBonus1",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutCritBonus1",1,AAPTR_PLAYER1);
}
else
{
A_GiveInventory("UppercutATKBonus2",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutDEFBonus2",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutCritBonus2",1,AAPTR_PLAYER1);
}
A_UppercutBonus;
}
MPU3 A 1 // FLUP F 1
{
Expand Down Expand Up @@ -2095,18 +2073,7 @@ actor FistFlora : FloraWeapon
FLUP D 1 { if (ACS_NamedExecuteWithResult("MiscVarCheckDECORATE",10035) >= 3) { A_SetTics(0); } }
FLUP E 1
{
if (random(1,256) > 64)
{
A_GiveInventory("UppercutATKBonus1",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutDEFBonus1",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutCritBonus1",1,AAPTR_PLAYER1);
}
else
{
A_GiveInventory("UppercutATKBonus2",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutDEFBonus2",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutCritBonus2",1,AAPTR_PLAYER1);
}
A_UppercutBonus;
}
FLU2 A 1 // FLUP F 1
{
Expand Down
131 changes: 81 additions & 50 deletions scripts/SPELLSRC.acs
Original file line number Diff line number Diff line change
Expand Up @@ -30915,33 +30915,37 @@ script "CENTRALSCRIPTOFEVERYTHING" ENTER
if (GameSkill() > SKILL_NORMAL) MiscellaneousVars[235] /= 5;
if (GetCVar("dvdsdebug_showcriticalhitstuff") > 0) PrintBold(s:"Crit Rate %: ",d:MiscellaneousVars[235],s:" [Base]");

DivineAvatarBuffValue = ((PlayerLevel * 5) / 4); // Each level is +0.125% crit rate
MiscellaneousVars[235] += DivineAvatarBuffValue;
if (GetCVar("dvdsdebug_showcriticalhitstuff") > 0) PrintBold(s:"Crit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:DivineAvatarBuffValue,s:") [LvlCheck]");
int LevelCritValue = ((PlayerLevel * 5) / 4); // Each level is +0.125% crit rate
MiscellaneousVars[235] += LevelCritValue;

DivineAvatarBuffValue = ((MiscellaneousVars[31] * 3) / 4); // 1 pt of Agility is +0.075% crit rate
MiscellaneousVars[235] += DivineAvatarBuffValue;
if (GetCVar("dvdsdebug_showcriticalhitstuff") > 0) PrintBold(s:"Crit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:DivineAvatarBuffValue,s:") [AglCheck]");
int AGLCritValue = ((MiscellaneousVars[31] * 3) / 4); // 1 pt of Agility is +0.075% crit rate
MiscellaneousVars[235] += AGLCritValue;

DivineAvatarBuffValue = ((MiscellaneousVars[32] * 3) / 8); // 1 pt of Defense is +0.0375% crit rate
MiscellaneousVars[235] += DivineAvatarBuffValue;
if (GetCVar("dvdsdebug_showcriticalhitstuff") > 0) PrintBold(s:"Crit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:DivineAvatarBuffValue,s:") [DefCheck]");
int DEFCritValue = ((MiscellaneousVars[32] * 3) / 8); // 1 pt of Defense is +0.0375% crit rate
MiscellaneousVars[235] += DEFCritValue;

DivineAvatarBuffValue = ((MiscellaneousVars[33] * 7) / 4); // 1 pt of Deftness is +0.175% crit rate
MiscellaneousVars[235] += DivineAvatarBuffValue;
if (GetCVar("dvdsdebug_showcriticalhitstuff") > 0) PrintBold(s:"Crit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:DivineAvatarBuffValue,s:") [DeftCheck]");
int DFTCritValue = ((MiscellaneousVars[33] * 7) / 4); // 1 pt of Deftness is +0.175% crit rate
MiscellaneousVars[235] += DFTCritValue;

DivineAvatarBuffValue = ((MiscellaneousVars[34] * 1) / 8); // 1 pt of Sorcery is +0.0125% crit rate
MiscellaneousVars[235] += DivineAvatarBuffValue;
if (GetCVar("dvdsdebug_showcriticalhitstuff") > 0) PrintBold(s:"Crit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:DivineAvatarBuffValue,s:") [SorcCheck]");
int SORCritValue = ((MiscellaneousVars[34] * 1) / 8); // 1 pt of Sorcery is +0.0125% crit rate
MiscellaneousVars[235] += SORCritValue;

DivineAvatarBuffValue = ((MiscellaneousVars[35] * 1) / 2); // 1 pt of Strength is +0.05% crit rate
MiscellaneousVars[235] += DivineAvatarBuffValue;
if (GetCVar("dvdsdebug_showcriticalhitstuff") > 0) PrintBold(s:"Crit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:DivineAvatarBuffValue,s:") [StrCheck]");
int STRCritValue = ((MiscellaneousVars[35] * 1) / 2); // 1 pt of Strength is +0.05% crit rate
MiscellaneousVars[235] += STRCritValue;

DivineAvatarBuffValue = ((MiscellaneousVars[36] * 1) / 8); // 1 pt of Therapeusis is +0.0125% crit rate
MiscellaneousVars[235] += DivineAvatarBuffValue;
if (GetCVar("dvdsdebug_showcriticalhitstuff") > 0) PrintBold(s:"Crit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:DivineAvatarBuffValue,s:") [TherCheck]");
int THECritValue = ((MiscellaneousVars[36] * 1) / 8); // 1 pt of Therapeusis is +0.0125% crit rate
MiscellaneousVars[235] += THECritValue;

if (GetCVar("dvdsdebug_showcriticalhitstuff") > 0)
{
PrintBold(s:"Crit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:LevelCritValue,s:") [LvlCheck]",
s:"\nCrit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:AGLCritValue,s:") [AglCheck]",
s:"\nCrit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:DEFCritValue,s:") [DefCheck]",
s:"\nCrit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:DFTCritValue,s:") [DeftCheck]",
s:"\nCrit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:SORCritValue,s:") [SorcCheck]",
s:"\nCrit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:STRCritValue,s:") [StrCheck]",
s:"\nCrit Rate %: ",d:MiscellaneousVars[235],s:" (+",d:THECritValue,s:") [TherCheck]");
}


// Oomph = (8.33% of remaining amount uncovered)
Expand Down Expand Up @@ -35112,7 +35116,7 @@ script "CENTRALSCRIPTOFEVERYTHING" ENTER
s:"\n",
s:"\nCVarAdjustSpeed x: ",f:CVarAdjustSpeed,
s:"\n",
s:"\nStaminaSpeed x: ",f:StaminaSpeed, s:" \cy(Stam:\c- ", d:StaminaPercentFull, s:"\cy)",
s:"\nStaminaSpeed x: ",f:StaminaSpeed, s:" \cy(Stam:\c- ", d:StaminaPercentFull, s:"\cy)\c-",
s:"\nDodgeMoreSpeed x: ",f:DodgeMoreSpeed,
s:"\nJumpMoreSpeed x: ",f:JumpMoreSpeed,
s:"\nOnTheMoveSpeed x: ",f:OnTheMoveSpeed,
Expand Down Expand Up @@ -35546,37 +35550,40 @@ script "SauronGauntletsHit" (int Amount, int HitType)
{
if (GetUserVariable(0,"user_MaxHP") > 0) Amount = GetUserVariable(0,"user_MaxHP");
else Amount = GetActorProperty(0,APROP_SpawnHealth);
Amount = Amount / 500;
Amount = Amount + 1;
Amount = (Amount / 500) + 1;
}
else
if (HitType == 2) // Give some life when killing a monster [3+(HP/100)]
if (HitType == 2) // Give more life when killing a monster [3+(HP/100)]
{
if (GetUserVariable(0,"user_MaxHP") > 0) Amount = GetUserVariable(0,"user_MaxHP");
else Amount = GetActorProperty(0,APROP_SpawnHealth);
Amount = Amount / 100;
Amount = Amount + 3;
Amount = (Amount / 100) + 3;
}
If (Amount <= 0) Amount = 1;
// if (CharacterClass == 2) PlaySound(Player1TID,"healing_dq",CHAN_BODY,1.0,0,ATTN_NORM);
// else PlaySound(Player1TID,"HealSpell1",CHAN_BODY,1.0,0,ATTN_NORM);

if (CharacterClass == 2) ActivatorSound("healing_dq",127);
else ActivatorSound("HealSpell1",127);

MiscellaneousVars[49] = 1; // Screen Flash
ACS_NamedExecuteAlways("EmulateGiveHealthBonus",0,Amount,0,0); // Restore Health
if (CharacterClass != 2) ACS_NamedExecuteAlways("EmulateGiveArmorBonus",0,Amount,0,0); // Restore Armor [Flora Cannot Gain Armor from it though]
// Restore Health
ACS_NamedExecuteAlways("EmulateGiveHealthBonus",0,Amount,0,0);

// Restore Armor
int ArmorAmount = (Amount * random(2,3)) / 5;
If (ArmorAmount <= 0) ArmorAmount = 1;
if (CharacterClass != 2) ACS_NamedExecuteAlways("EmulateGiveArmorBonus",0,ArmorAmount,0,0); // Restore Armor [Flora Cannot Gain Armor from it though]

// Restore Mana
int ManaAmount = (Amount * random(2,3)) / 3;
C1 = (PlayerLevel * 4) + 100;
C2 = Amount;
C2 = C2 * C1 / 100;
if (CharacterClass == 2) C2 = C2 * 3 / 2; // Flora will gain Extra Mana from a Gauntlet punch to make up for not being able to get armor.
CurrentMana += C2;
ManaAmount = Amount;
ManaAmount = ManaAmount * C1 / 100;
if (CharacterClass == 2) ManaAmount = ManaAmount * random(5,7) / 4; // Flora will gain Extra Mana from a Gauntlet punch to make up for not being able to get armor.
else if (CharacterClass == 8) ManaAmount = ManaAmount * random(4,6) / 4; // Ailish will gain Extra Mana from a Gauntlet punch as well.
else ManaAmount = ManaAmount * random(3,5) / 4;
If (ManaAmount <= 0) ManaAmount = 1;
CurrentMana += ManaAmount;
if (CurrentMana > MaxManaLimit) CurrentMana = MaxManaLimit;
SetHudSize(640,480,0);
SetFont("DVDSSMLFONT");
//if (MiscellaneousVars[2000] == 0) HudMessage(s:"+",d:C2,s:" Mana";HUDMSG_ALPHA,3419,cr_blue,0.036,0.081,0.75);
}

// Makes Monsters in MAP04 [DVI-DS] or MAP12 [DVII-DS] have a TID of 666 [this makes them suspectible to the Sauravatar's activation script]
Expand Down Expand Up @@ -41168,19 +41175,31 @@ script "QuakeMeleeDuration" (int attacktype)
duration = duration + (MiscellaneousVars[35] / 14);
}
int baseduration = duration;
if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"Duration [Base]: ",d:duration);

if (MiscellaneousVars[317] > 0) duration = (duration * (8 + (MiscellaneousVars[317] * 3)) / 8);
if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"Duration [StaminaUpgrades]: ",d:duration);
int stamduration = duration;
if (CharacterClass == 0) duration = duration * 3 / 2;
if (CharacterClass == 1) duration = duration * 5 / 4;
if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"Duration [CharacterCheck]: ",d:duration);
int charduration = duration;

if (PowerupTimer[7] > 0) duration = duration * 3 / 2;
if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"Duration [DivineAvatar]: ",d:duration);
int dvavduration = duration;

if (CheckActorInventory(Player1TID,"PowerStrength") > 0) duration *= 4;
if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"Duration [Berserk]: ",d:duration);
int bersduration = duration;

if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"Duration [Final]: ",d:duration,s:" [Base: ",d:baseduration,s:"]");
if (GetCVar("dvdsdebug_showmeleeinformation") > 0)
{
PrintBold(s:"Duration [Base]: ",d:baseduration,
s:"\n",
s:"\nDuration [StaminaUpgrades]: ",d:stamduration,
s:"\nDuration [CharacterCheck]: ",d:charduration,
s:"\nDuration [DivineAvatar]: ",d:dvavduration,
s:"\nDuration [Berserk]: ",d:bersduration,
s:"\n",
s:"\nDuration [Final]: ",d:duration,s:" [Base: ",d:baseduration,s:"]");
}

SetResultValue(duration);
}
script "QuakeMeleeTremrad" (int attacktype)
Expand Down Expand Up @@ -41270,19 +41289,31 @@ script "QuakeMeleeTremrad" (int attacktype)
tremrad = tremrad + ((MiscellaneousVars[35] * 13) / 4);
}
int basetremrad = tremrad;
if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"TremRad [Base]: ",d:tremrad);

if (MiscellaneousVars[317] > 0) tremrad = (tremrad * (8 + (MiscellaneousVars[317] * 3)) / 8);
if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"TremRad [StaminaUpgrades]: ",d:tremrad);
int stamtremrad = tremrad;

if (CharacterClass == 0) tremrad = tremrad * 3 / 2;
if (CharacterClass == 1) tremrad = tremrad * 5 / 4;
if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"TremRad [CharacterCheck]: ",d:tremrad);
int chartremrad = tremrad;

if (PowerupTimer[7] > 0) tremrad = tremrad * 3 / 2;
if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"TremRad [DivineAvatar]: ",d:tremrad);
int dvavtremrad = tremrad;

if (CheckActorInventory(Player1TID,"PowerStrength") > 0) tremrad *= 8;
if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"TremRad [Berserk]: ",d:tremrad);
int berstremrad = tremrad;

if (GetCVar("dvdsdebug_showmeleeinformation") > 0) PrintBold(s:"TremRad [Final]: ",d:tremrad,s:" [Base: ",d:basetremrad,s:"]");
if (GetCVar("dvdsdebug_showmeleeinformation") > 0)
{
PrintBold(s:"TremRad [Base]: ",d:basetremrad,
s:"\n",
s:"\nTremRad [StaminaUpgrades]: ",d:stamtremrad,
s:"\nTremRad [CharacterCheck]: ",d:chartremrad,
s:"\nTremRad [DivineAvatar]: ",d:dvavtremrad,
s:"\nTremRad [Berserk]: ",d:berstremrad,
s:"\n",
s:"\nTremRad [Final]: ",d:tremrad);
}
SetResultValue(tremrad);
}

Expand Down
45 changes: 20 additions & 25 deletions zscript/dvds-actorclass.zc
Original file line number Diff line number Diff line change
Expand Up @@ -1529,9 +1529,10 @@ class AetheriusMonsterZSC : AetheriusBaseZSC

override int DamageMobj(Actor inflictor, Actor source, int damage, Name mod, int flags = 0, double angle = 0)
{

int olddmg = damage;
int dealtcrit = 0;
double dmgmulti = frandom(1.9,2.1);
double dmgmulti = 2.0 + (0.01 * random(-10,10));
// Player Check
if (source) let playpawn = AetheriusPlayerPawn(source);
if (playpawn)
Expand Down Expand Up @@ -1570,6 +1571,20 @@ class AetheriusMonsterZSC : AetheriusBaseZSC
if (dealtcrit == 1) Console.Printf("(\cfCRIT:\c- \cyolddmg/critdmg/finaldmg\c- = \cy%d\c- / \cy%d\c- / \cy%d\c-, \cadmgmulti\c- = \ca%3f\c-, \cwdmgtype = \cw%s\c-, \cavictim\c- = \ca%s\c-, \cdinflictor\c- = \cd%s\c-, \cnsource\c- = \cn%s\c-)", olddmg, predmg, ret, dmgmulti, mod, vict, infl, sour);
else Console.Printf("(\ckHIT:\c- \cyolddmg/finaldmg\c- = \cy%d\c- / \cy%d\c-, \cwdmgtype\c- = \cw%s\c-, \cavictim\c- = \ca%s\c-, \cdinflictor\c- = \cd%s\c-, \cnsource\c- = \cn%s\c-)", olddmg, ret, mod, vict, infl, sour);
}

// Gauntlet HP/MP/AP drain
if (ret > 0 && bFRIENDLY == 0 && (infl == "GauntletPuff" || infl == "GauntletAltPuff"))
{
if (health > 0) ACS_NamedExecuteAlways("SauronGauntletsHit",0,0,1,0); // Give some life when hurting a monster [1+(HP/500)]
if (health <= 0) ACS_NamedExecuteAlways("SauronGauntletsHit",0,0,2,0); // Give more life when killing a monster [3+(HP/100)]
}
// Sceptre EXP Gain
if (ret > 0 && bFRIENDLY == 0 && (infl == "SceptrePuff-Normal" || infl == "SceptrePuff-Spinning"))
{
if (health > 0) ACS_NamedExecuteAlways("AddSceptreEXP",0,0,0,10);
if (health <= 0) ACS_NamedExecuteAlways("AddSceptreEXP",0,0,0,1);
}

return ret;
}
//****************************
Expand Down Expand Up @@ -3598,30 +3613,6 @@ class AetheriusMonsterZSC : AetheriusBaseZSC
ACS_NamedExecuteAlways("Hand-GravityAttack",0,2,0,0);
SetStateLabel("See");
}
Pain.Sceptre:
TNT1 A 0
{
if (bFRIENDLY == 0) ACS_NamedExecuteAlways("AddSceptreEXP",0,0,0,10); // Increase EXP for Sceptre [1+(HP/300)]
SetStateLabel("Pain");
}
Death.Sceptre:
TNT1 A 0
{
if (bFRIENDLY == 0) ACS_NamedExecuteAlways("AddSceptreEXP",0,0,0,1); // Increase EXP for Sceptre [1+(HP/300)]
if (health <= user_HPXDeathRange) SetStateLabel("XDeath"); else SetStateLabel("Death");
}
Pain.Gauntlets:
TNT1 A 0
{
ACS_NamedExecuteAlways("SauronGauntletsHit",0,0,1,0); // Give some life when hurting a monster [1+(HP/500)]
SetStateLabel("Pain");
}
Death.Gauntlets:
TNT1 A 0
{
ACS_NamedExecuteAlways("SauronGauntletsHit",0,0,2,0); // Give some life when hurting a monster [1+(HP/500)]
if (health <= user_HPXDeathRange) SetStateLabel("XDeath"); else SetStateLabel("Death");
}
}
}

Expand Down Expand Up @@ -4136,6 +4127,10 @@ class AetheriusPlayerPawn : PlayerPawn

damage -= defense;
if (damage < 0) damage = 0;
else
{
ACS_NamedExecuteAlways("CursedShieldPain",0,1,0,0);
}

if (GetCVar("dvdsdebug_playerdmgdisplays") > 0 && damage > 0) Console.Printf("(player-damagemobj input: olddmg = %d, basedef = %d, armdef = %d, def = %d, newdmg = %d, type = %s)", olddmg, basedef, armordef, defense, damage, mod);
}
Expand Down
26 changes: 26 additions & 0 deletions zscript/dvds-weapclass.zc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,32 @@ class AetheriusBaseWeaponZSC : Weapon
const spread2height1 = 0.0;
const spread2height2 = 0.0;

void A_UppercutBonus()
{
if (random(1,6) == 1)
{
A_GiveInventory("UppercutCritBonus2",1,AAPTR_PLAYER1);
}
else
{
A_GiveInventory("UppercutCritBonus1",1,AAPTR_PLAYER1);
}

if (random(1,6) == 1)
{
if (random(1,6) == 1)
{
A_GiveInventory("UppercutATKBonus2",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutDEFBonus2",1,AAPTR_PLAYER1);
}
else
{
A_GiveInventory("UppercutATKBonus1",1,AAPTR_PLAYER1);
A_GiveInventory("UppercutDEFBonus1",1,AAPTR_PLAYER1);
}
}
}

// Hell Warrior Shield
void A_PHellWarShieldOff()
{
Expand Down

0 comments on commit fe1d24f

Please sign in to comment.