mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-08-07 21:25:26 +01:00
mcastu bugfixes
Number monster spells for bugfix reasons Add concept of an aoe spell, that still gets damage when monsters haven't found you Aoe spells don't have their damage reduced, sorry
This commit is contained in:
parent
cf8941ea98
commit
b37d7e60a4
1 changed files with 24 additions and 3 deletions
27
src/mcastu.c
27
src/mcastu.c
|
@ -15,17 +15,20 @@ extern void demonpet();
|
|||
#define MAGIC_MISSILE OPEN_WOUNDS+1 /* magic missile */
|
||||
#define DRAIN_LIFE MAGIC_MISSILE+1 /* drain life */
|
||||
#define ARROW_RAIN DRAIN_LIFE+1
|
||||
//5
|
||||
#define CONE_OF_COLD ARROW_RAIN+1 /* cone of cold */
|
||||
#define LIGHTNING CONE_OF_COLD+1
|
||||
#define FIRE_PILLAR LIGHTNING+1
|
||||
#define GEYSER FIRE_PILLAR+1
|
||||
#define ACID_RAIN GEYSER+1
|
||||
//10
|
||||
#define ICE_STORM ACID_RAIN+1
|
||||
#define SUMMON_MONS ICE_STORM+1
|
||||
#define SUMMON_DEVIL SUMMON_MONS+1
|
||||
#define DEATH_TOUCH SUMMON_DEVIL+1
|
||||
/* healing spells */
|
||||
#define CURE_SELF DEATH_TOUCH+1 /* healing */
|
||||
//15
|
||||
#define MASS_CURE_CLOSE CURE_SELF+1 /* heal allies */
|
||||
#define MASS_CURE_FAR MASS_CURE_CLOSE+1 /* heal allies */
|
||||
#define RECOVER MASS_CURE_FAR+1 /* remove afflictions */
|
||||
|
@ -33,45 +36,53 @@ extern void demonpet();
|
|||
#define MAKE_VISIBLE RECOVER+1
|
||||
/* (dis)enchantment spells */
|
||||
#define HASTE_SELF MAKE_VISIBLE+1 /* haste self */
|
||||
//20
|
||||
#define STUN_YOU HASTE_SELF+1
|
||||
#define CONFUSE_YOU STUN_YOU+1
|
||||
#define PARALYZE CONFUSE_YOU+1
|
||||
#define BLIND_YOU PARALYZE+1
|
||||
#define SLEEP BLIND_YOU+1 /* sleep */
|
||||
//25
|
||||
#define DRAIN_ENERGY SLEEP+1
|
||||
#define WEAKEN_STATS DRAIN_ENERGY+1
|
||||
#define WEAKEN_YOU WEAKEN_STATS+1
|
||||
#define DESTRY_ARMR WEAKEN_YOU+1
|
||||
#define DESTRY_WEPN DESTRY_ARMR+1
|
||||
//30
|
||||
#define EVIL_EYE DESTRY_WEPN+1
|
||||
/* clerical spells */
|
||||
#define CURSE_ITEMS EVIL_EYE+1
|
||||
#define INSECTS CURSE_ITEMS+1
|
||||
#define RAISE_DEAD INSECTS+1
|
||||
#define SUMMON_ANGEL RAISE_DEAD+1
|
||||
//35
|
||||
#define SUMMON_ALIEN SUMMON_ANGEL+1
|
||||
#define PLAGUE SUMMON_ALIEN+1
|
||||
#define PUNISH PLAGUE+1
|
||||
#define AGGRAVATION PUNISH+1
|
||||
/* escape spells */
|
||||
#define DISAPPEAR AGGRAVATION+1 /* invisibility */
|
||||
//40
|
||||
/* matter spells */
|
||||
#define DARKNESS DISAPPEAR+1
|
||||
#define SUMMON_SPHERE DARKNESS+1 /* flame sphere */
|
||||
#define MAKE_WEB SUMMON_SPHERE+1
|
||||
#define DROP_BOULDER MAKE_WEB+1
|
||||
#define EARTHQUAKE DROP_BOULDER+1
|
||||
//45
|
||||
#define TURN_TO_STONE EARTHQUAKE+1
|
||||
/* unique monster spells */
|
||||
#define NIGHTMARE TURN_TO_STONE+1
|
||||
#define FILTH NIGHTMARE+1
|
||||
#define CLONE_WIZ FILTH+1
|
||||
#define STRANGLE CLONE_WIZ+1
|
||||
//50
|
||||
#define MON_FIRA STRANGLE+1
|
||||
#define MON_FIRAGA MON_FIRA+1
|
||||
#define MON_BLIZZARA MON_FIRAGA+1
|
||||
#define MON_BLIZZAGA MON_BLIZZARA+1
|
||||
#define MON_THUNDARA MON_BLIZZAGA+1
|
||||
//55
|
||||
#define MON_THUNDAGA MON_THUNDARA+1
|
||||
#define MON_FLARE MON_THUNDAGA+1
|
||||
#define MON_WARP MON_FLARE+1
|
||||
|
@ -887,7 +898,17 @@ castmu(mtmp, mattk, thinks_it_foundyou, foundyou)
|
|||
* of the monster casting the spell.
|
||||
*/
|
||||
if (!foundyou) {
|
||||
dmg = 0;
|
||||
if(is_aoe_spell(spellnum)){
|
||||
int dmd = 6, dmn = ml/2;
|
||||
if (mattk->damd) dmd = (int)(mattk->damd);
|
||||
|
||||
if (mattk->damn) dmn+= (int)(mattk->damn);
|
||||
else dmn += 1;
|
||||
|
||||
dmg = d(dmn, dmd);
|
||||
} else{
|
||||
dmg = 0;
|
||||
}
|
||||
if (mattk->adtyp != AD_SPEL && mattk->adtyp != AD_CLRC) {
|
||||
impossible(
|
||||
"%s casting non-hand-to-hand version of hand-to-hand spell %d?",
|
||||
|
@ -903,7 +924,7 @@ castmu(mtmp, mattk, thinks_it_foundyou, foundyou)
|
|||
|
||||
dmg = d(dmn, dmd);
|
||||
}
|
||||
if (Half_spell_damage) dmg = (dmg+1) / 2;
|
||||
if (Half_spell_damage && !is_aoe_spell(spellnum)) dmg = (dmg+1) / 2;
|
||||
|
||||
ret = 1;
|
||||
|
||||
|
@ -1165,7 +1186,7 @@ int spellnum;
|
|||
if (mtmp) {
|
||||
do_earthquake(min(((int)mtmp->m_lev - 1) / 6 + 1,12), TRUE, mtmp);
|
||||
} else {
|
||||
pline("cast_spell: [FIXME] true \"not my fault\" flag needed.");
|
||||
// pline("cast_spell: [FIXME] true \"not my fault\" flag needed.");
|
||||
do_earthquake(rnd(5), TRUE, (struct monst *)1); //Fixme: true "not my fault" flag needed.
|
||||
}
|
||||
aggravate(); /* wake up without scaring */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue