mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-08-13 08:01:40 +01:00
Hit message changes depending on number of rays
This commit is contained in:
parent
71b9a8e1d9
commit
44750d30b1
1 changed files with 40 additions and 30 deletions
70
src/mcastu.c
70
src/mcastu.c
|
@ -1639,6 +1639,7 @@ int spellnum;
|
|||
}
|
||||
case SILVER_RAYS:{
|
||||
int n = 0;
|
||||
char * rays;
|
||||
dmg = 0;
|
||||
if(zap_hit(&youmonst, 0, TRUE))
|
||||
n++;
|
||||
|
@ -1648,46 +1649,50 @@ int spellnum;
|
|||
pline("Silver rays whiz past you!");
|
||||
break;
|
||||
}
|
||||
if (n == 1)
|
||||
rays = "a ray";
|
||||
if (n >= 2)
|
||||
rays = "rays";
|
||||
if(hates_silver(youracedata)){
|
||||
You("are seared by silver light!");
|
||||
You("are seared by %s of silver light!", rays);
|
||||
dmg = d(n*2,20);
|
||||
} else if(!Fire_resistance && species_resists_cold(&youmonst)){
|
||||
You("are burned by silver light!");
|
||||
You("are burned by %s of silver light!", rays);
|
||||
dmg = (d(n,20)*3+1)/2;
|
||||
destroy_item(SCROLL_CLASS, AD_FIRE);
|
||||
destroy_item(POTION_CLASS, AD_FIRE);
|
||||
destroy_item(SPBOOK_CLASS, AD_FIRE);
|
||||
} else if(!Cold_resistance && species_resists_fire(&youmonst)){
|
||||
You("are frozen by silver light!");
|
||||
You("are frozen by %s of silver light!", rays);
|
||||
dmg = (d(n,20)*3+1)/2;
|
||||
destroy_item(POTION_CLASS, AD_COLD);
|
||||
} else if(hates_unholy(youracedata)){
|
||||
You("are seared by unholy light!");
|
||||
You("are seared by %s of unholy light!", rays);
|
||||
dmg = d(n,20) + d(n,9);
|
||||
} else if(hates_holy(youracedata)){
|
||||
You("are seared by holy light!");
|
||||
You("are seared by %s of holy light!", rays);
|
||||
dmg = d(n,20) + d(n,7);
|
||||
} else if(!Fire_resistance){
|
||||
You("are burned by silver light!");
|
||||
You("are burned by %s of silver light!", rays);
|
||||
dmg = d(n,20);
|
||||
destroy_item(SCROLL_CLASS, AD_FIRE);
|
||||
destroy_item(POTION_CLASS, AD_FIRE);
|
||||
destroy_item(SPBOOK_CLASS, AD_FIRE);
|
||||
} else if(!Shock_resistance){
|
||||
You("are shocked by silver light!");
|
||||
You("are shocked by %s of silver light!", rays);
|
||||
dmg = d(n,20);
|
||||
destroy_item(WAND_CLASS, AD_ELEC);
|
||||
destroy_mitem(mtmp, RING_CLASS, AD_ELEC);
|
||||
} else if(!Cold_resistance){
|
||||
You("are frozen by silver light!");
|
||||
You("are frozen by %s of silver light!", rays);
|
||||
dmg = d(n,20);
|
||||
destroy_item(POTION_CLASS, AD_COLD);
|
||||
} else if(!Acid_resistance){
|
||||
You("are burned by silver light!");
|
||||
You("are burned by %s of silver light!", rays);
|
||||
dmg = d(n,20);
|
||||
destroy_item(POTION_CLASS, AD_FIRE);
|
||||
} else {
|
||||
You("are pierced by silver light!");
|
||||
You("are pierced by %s of silver light!", rays);
|
||||
dmg = 0;
|
||||
if(u.uac < 0){
|
||||
dmg += rnd(20) + AC_VALUE(u.uac+u.uspellprot)-u.uspellprot;
|
||||
|
@ -4233,6 +4238,7 @@ uspsibolt:
|
|||
}
|
||||
case SILVER_RAYS:{
|
||||
int n = 0;
|
||||
char * rays;
|
||||
dmg = 0;
|
||||
if (!mtmp || mtmp->mhp < 1) {
|
||||
impossible("silver rays spell with no mtmp");
|
||||
|
@ -4248,66 +4254,70 @@ uspsibolt:
|
|||
mon_nam(mtmp));
|
||||
break;
|
||||
}
|
||||
if (n == 1)
|
||||
rays = "a ray";
|
||||
if (n >= 2)
|
||||
rays = "rays";
|
||||
if(hates_silver(mtmp->data)){
|
||||
if (yours || canseemon(mtmp))
|
||||
pline("%s is seared by silver light!",
|
||||
Monnam(mtmp));
|
||||
pline("%s is seared by %s of silver light!",
|
||||
Monnam(mtmp), rays);
|
||||
dmg = d(n*2,20);
|
||||
} else if(!resists_fire(mtmp) && species_resists_cold(mtmp)){
|
||||
if (yours || canseemon(mtmp))
|
||||
pline("%s is burned by silver light!",
|
||||
Monnam(mtmp));
|
||||
pline("%s is burned by %s of silver light!",
|
||||
Monnam(mtmp), rays);
|
||||
dmg = (d(n,20)*3+1)/2;
|
||||
destroy_mitem(mtmp, SCROLL_CLASS, AD_FIRE);
|
||||
destroy_mitem(mtmp, POTION_CLASS, AD_FIRE);
|
||||
destroy_mitem(mtmp, SPBOOK_CLASS, AD_FIRE);
|
||||
} else if(!resists_cold(mtmp) && species_resists_fire(mtmp)){
|
||||
if (yours || canseemon(mtmp))
|
||||
pline("%s is frozen by silver light!",
|
||||
Monnam(mtmp));
|
||||
pline("%s is frozen by %s of silver light!",
|
||||
Monnam(mtmp), rays);
|
||||
dmg = (d(n,20)*3+1)/2;
|
||||
destroy_mitem(mtmp, POTION_CLASS, AD_COLD);
|
||||
} else if(hates_unholy(mtmp->data)){
|
||||
if (yours || canseemon(mtmp))
|
||||
pline("%s is seared by unholy light!",
|
||||
Monnam(mtmp));
|
||||
pline("%s is seared by %s of unholy light!",
|
||||
Monnam(mtmp), rays);
|
||||
dmg = d(n,20) + d(n,9);
|
||||
} else if(hates_holy_mon(mtmp)){
|
||||
if (yours || canseemon(mtmp))
|
||||
pline("%s is seared by holy light!",
|
||||
Monnam(mtmp));
|
||||
pline("%s is seared by %s of holy light!",
|
||||
Monnam(mtmp), rays);
|
||||
dmg = d(n,20) + d(n,7);
|
||||
} else if(!resists_fire(mtmp)){
|
||||
if (yours || canseemon(mtmp))
|
||||
pline("%s is burned by silver light!",
|
||||
Monnam(mtmp));
|
||||
pline("%s is burned by %s of silver light!",
|
||||
Monnam(mtmp), rays);
|
||||
dmg = d(n,20);
|
||||
destroy_mitem(mtmp, SCROLL_CLASS, AD_FIRE);
|
||||
destroy_mitem(mtmp, POTION_CLASS, AD_FIRE);
|
||||
destroy_mitem(mtmp, SPBOOK_CLASS, AD_FIRE);
|
||||
} else if(!resists_elec(mtmp)){
|
||||
if (yours || canseemon(mtmp))
|
||||
pline("%s is shocked by silver light!",
|
||||
Monnam(mtmp));
|
||||
pline("%s is shocked by %s of silver light!",
|
||||
Monnam(mtmp), rays);
|
||||
dmg = d(n,20);
|
||||
destroy_mitem(mtmp, WAND_CLASS, AD_ELEC);
|
||||
destroy_mitem(mtmp, RING_CLASS, AD_ELEC);
|
||||
} else if(!resists_cold(mtmp)){
|
||||
if (yours || canseemon(mtmp))
|
||||
pline("%s is frozen by silver light!",
|
||||
Monnam(mtmp));
|
||||
pline("%s is frozen by %s of silver light!",
|
||||
Monnam(mtmp), rays);
|
||||
dmg = d(n,20);
|
||||
destroy_mitem(mtmp, POTION_CLASS, AD_COLD);
|
||||
} else if(!resists_acid(mtmp)){
|
||||
if (yours || canseemon(mtmp))
|
||||
pline("%s is burned by silver light!",
|
||||
Monnam(mtmp));
|
||||
pline("%s is burned by %s of silver light!",
|
||||
Monnam(mtmp), rays);
|
||||
dmg = d(n,20);
|
||||
destroy_mitem(mtmp, POTION_CLASS, AD_FIRE);
|
||||
} else {
|
||||
if (yours || canseemon(mtmp))
|
||||
pline("%s is pierced by silver light!",
|
||||
Monnam(mtmp));
|
||||
pline("%s is pierced by %s of silver light!",
|
||||
Monnam(mtmp), rays);
|
||||
dmg = d(n, 20);
|
||||
}
|
||||
}break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue