vht/vhtzs/fnplayer.zsc
Alison Watson 6928c2f898 + add aesthetic fixes for small hud font to make it consistent with the big hud font
+ add option to add a projectile to timon's axe (splits mana use)
+ add option to speed up sapphire wand
+ make pickup flashes bright
+ make sapphire wand's trail look more like the explosion
+ add option to display a detailed quest log on the automap
+ make ettins and centaurs not play a hit sound when missing
+ add an option to set the behaviour of centaurs to make them more vulnerable
+ add an option to make players shatter frozen enemies on touch
+ add an option to change the sapphire wand's damage function
+ make sapphire wand's projectile appear at the proper height
+ add an option to change the frost spell's damage function
+ add an option to make bloodscourge's projectiles foil invulnerability
2022-07-10 07:24:30 -06:00

57 lines
1.1 KiB
Plaintext

class VhtFnPlayer abstract {
int m_player;
virtual bool vhtCall(PlayerInfo p) {return false;}
bool vhtRun() {
for(int i = 0; i < MAXPLAYERS; ++i) {
if(playerInGame[i] && vhtCall(players[i])) {
m_player = i;
return true;
}
}
return false;
}
}
class VhtFnPlayerInSector : VhtFnPlayer {
int m_idx;
VhtFnPlayer vhtInit(int idx) {
m_idx = idx;
return self;
}
override bool vhtCall(PlayerInfo p) {
return p.mo.curSector.index() == m_idx;
}
}
class VhtFnPlayerInv : VhtFnPlayer abstract {
class<Inventory> m_which;
Inventory m_result;
override bool vhtCall(PlayerInfo p) {
let inv = p.mo.findInventory(m_which);
if(inv) {
m_result = inv;
return true;
}
return false;
}
}
class VhtFnPlayerInvExist : VhtFnPlayerInv {
VhtFnPlayerInv vhtInit(class<Inventory> which) {
m_which = which;
return self;
}
}
class VhtFnPlayerInvAmount : VhtFnPlayerInv {
int m_amount;
VhtFnPlayerInv vhtInit(class<Inventory> which, int amount) {
m_which = which;
m_amount = amount;
return self;
}
override bool vhtCall(PlayerInfo p) {
return super.vhtCall(p) && m_result.amount >= m_amount;
}
}