mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-05-01 21:05:12 +01:00
Adjust wrathful weapon handling to be more general with templates.
Previously used special codes, now uses monsters with the correct general MA_ tags. Won't do specific tags but better than it was.
This commit is contained in:
parent
6122c71566
commit
70c471addd
3 changed files with 19 additions and 33 deletions
|
@ -14458,27 +14458,13 @@ struct monst *mon;
|
|||
)
|
||||
return 1;
|
||||
} else {
|
||||
if(has_template(mon, ZOMBIFIED) || has_template(mon, YELLOW_TEMPLATE)){
|
||||
if((otmp->wrathdata >> 2) == PM_ZOMBIE)
|
||||
return 1;
|
||||
} else if(has_template(mon, SKELIFIED)){
|
||||
if((otmp->wrathdata >> 2) == PM_SKELETON)
|
||||
return 1;
|
||||
} else if(has_template(mon, VAMPIRIC)){
|
||||
if((otmp->wrathdata >> 2) == PM_VAMPIRE)
|
||||
return 1;
|
||||
} else if(has_template(mon, PSEUDONATURAL)){
|
||||
if((otmp->wrathdata >> 2) == PM_MIND_FLAYER)
|
||||
return 1;
|
||||
} else {
|
||||
if((otmp->wrathdata >> 2) == mon->mtyp)
|
||||
return 1;
|
||||
|
||||
if(mons[(otmp->wrathdata >> 2)].mflagsa &&
|
||||
((mons[(otmp->wrathdata >> 2)].mflagsa&(mon->data->mflagsa)) != 0)
|
||||
){
|
||||
return 1;
|
||||
}
|
||||
if((otmp->wrathdata >> 2) == mon->mtyp)
|
||||
return 1;
|
||||
|
||||
if(mons[(otmp->wrathdata >> 2)].mflagsa &&
|
||||
((mons[(otmp->wrathdata >> 2)].mflagsa&(mon->data->mflagsa)) != 0)
|
||||
){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -16208,14 +16208,14 @@ struct monst *mtmp, *victim;
|
|||
if((otmp->wrathdata&0x3L) < 3) otmp->wrathdata++;
|
||||
}
|
||||
else {
|
||||
if(has_template(victim, ZOMBIFIED)){
|
||||
otmp->wrathdata = PM_ZOMBIE<<2;
|
||||
if(has_template(victim, ZOMBIFIED) || has_template(victim, YELLOW_DEAD)){
|
||||
otmp->wrathdata = PM_GHOUL<<2;
|
||||
} else if(has_template(victim, SKELIFIED)){
|
||||
otmp->wrathdata = PM_SKELETON<<2;
|
||||
} else if(has_template(victim, VAMPIRIC)){
|
||||
otmp->wrathdata = PM_VAMPIRE<<2;
|
||||
} else if(has_template(victim, PSEUDONATURAL)){
|
||||
otmp->wrathdata = PM_MIND_FLAYER<<2;
|
||||
otmp->wrathdata = PM_PARASITIC_MIND_FLAYER<<2;
|
||||
} else {
|
||||
otmp->wrathdata = monsndx(victim->data)<<2;
|
||||
}
|
||||
|
@ -16227,14 +16227,14 @@ struct monst *mtmp, *victim;
|
|||
if((otmp->wrathdata&0xFF) < 3) otmp->wrathdata++;
|
||||
}
|
||||
else {
|
||||
if(has_template(victim, ZOMBIFIED)){
|
||||
otmp->wrathdata = PM_ZOMBIE<<2;
|
||||
if(has_template(victim, ZOMBIFIED) || has_template(victim, YELLOW_DEAD)){
|
||||
otmp->wrathdata = PM_GHOUL<<2;
|
||||
} else if(has_template(victim, SKELIFIED)){
|
||||
otmp->wrathdata = PM_SKELETON<<2;
|
||||
} else if(has_template(victim, VAMPIRIC)){
|
||||
otmp->wrathdata = PM_VAMPIRE<<2;
|
||||
} else if(has_template(victim, PSEUDONATURAL)){
|
||||
otmp->wrathdata = PM_MIND_FLAYER<<2;
|
||||
otmp->wrathdata = PM_PARASITIC_MIND_FLAYER<<2;
|
||||
} else {
|
||||
otmp->wrathdata = monsndx(victim->data)<<2;
|
||||
}
|
||||
|
|
12
src/mon.c
12
src/mon.c
|
@ -6229,14 +6229,14 @@ xkilled(mtmp, dest)
|
|||
if((otmp->wrathdata&0x3L) < 3) otmp->wrathdata++;
|
||||
}
|
||||
else {
|
||||
if(has_template(mtmp, ZOMBIFIED)){
|
||||
otmp->wrathdata = PM_ZOMBIE<<2;
|
||||
if(has_template(mtmp, ZOMBIFIED) || has_template(mtmp, YELLOW_DEAD)){
|
||||
otmp->wrathdata = PM_GHOUL<<2;
|
||||
} else if(has_template(mtmp, SKELIFIED)){
|
||||
otmp->wrathdata = PM_SKELETON<<2;
|
||||
} else if(has_template(mtmp, VAMPIRIC)){
|
||||
otmp->wrathdata = PM_VAMPIRE<<2;
|
||||
} else if(has_template(mtmp, PSEUDONATURAL)){
|
||||
otmp->wrathdata = PM_MIND_FLAYER<<2;
|
||||
otmp->wrathdata = PM_PARASITIC_MIND_FLAYER<<2;
|
||||
} else {
|
||||
otmp->wrathdata = monsndx(mtmp->data)<<2;
|
||||
}
|
||||
|
@ -6248,14 +6248,14 @@ xkilled(mtmp, dest)
|
|||
if((otmp->wrathdata&0xFF) < 3) otmp->wrathdata++;
|
||||
}
|
||||
else {
|
||||
if(has_template(mtmp, ZOMBIFIED)){
|
||||
otmp->wrathdata = PM_ZOMBIE<<2;
|
||||
if(has_template(mtmp, ZOMBIFIED) || has_template(mtmp, YELLOW_DEAD)){
|
||||
otmp->wrathdata = PM_GHOUL<<2;
|
||||
} else if(has_template(mtmp, SKELIFIED)){
|
||||
otmp->wrathdata = PM_SKELETON<<2;
|
||||
} else if(has_template(mtmp, VAMPIRIC)){
|
||||
otmp->wrathdata = PM_VAMPIRE<<2;
|
||||
} else if(has_template(mtmp, PSEUDONATURAL)){
|
||||
otmp->wrathdata = PM_MIND_FLAYER<<2;
|
||||
otmp->wrathdata = PM_PARASITIC_MIND_FLAYER<<2;
|
||||
} else {
|
||||
otmp->wrathdata = monsndx(mtmp->data)<<2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue