void rndcurse() /* curse a few inventory items at random! */ { int nobj = 0; int cnt, onum; struct obj *otmp; static const char *mal_aura = "feel a malignant aura surround %s."; if (uwep && (uwep->oartifact == ART_MAGICBANE) && rn2(20)) { You(mal_aura, "the magic-absorbing blade"); return; } if(Antimagic) { shieldeff(u.ux, u.uy); You(mal_aura, "you"); } for (otmp = invent; otmp; otmp = otmp->nobj) nobj++; if (nobj) for (cnt = rnd(6/((!!Antimagic) + (!!Half_spell_damage) + 1)); cnt > 0; cnt--) { onum = rn2(nobj); for(otmp = invent; onum != 0; onum--) otmp = otmp->nobj; if(otmp->oartifact && spec_ability(otmp, SPFX_INTEL) && rn2(10) < 8) { pline("%s resists!", The(xname(otmp))); continue; } if(otmp->blessed) unbless(otmp); else curse(otmp); } }
void rndcurse() /* curse a few inventory items at random! */ { int nobj = 0; int cnt, onum; struct obj *otmp; static const char mal_aura[] = "VERB_SPUEREN eine bösartige Aura um OBJECT %s."; /* EN static const char mal_aura[] = "feel a malignant aura surround %s."; */ if (uwep && (uwep->oartifact == ART_MAGICBANE) && rn2(20)) { You(mal_aura, "ARTIKEL_BESTIMMTER ADJEKTIV_MAGIE_ABSORBIEREND NOUN_KLINGE"); /* EN You(mal_aura, "the magic-absorbing blade"); */ return; } if(Antimagic) { shieldeff(u.ux, u.uy); You(mal_aura, "PRONOMEN_PERSONAL"); /* EN You(mal_aura, "you"); */ } for (otmp = invent; otmp; otmp = otmp->nobj) { #ifdef GOLDOBJ /* gold isn't subject to being cursed or blessed */ if (otmp->oclass == COIN_CLASS) continue; #endif nobj++; } if (nobj) { for (cnt = rnd(6/((!!Antimagic) + (!!Half_spell_damage) + 1)); cnt > 0; cnt--) { onum = rnd(nobj); for (otmp = invent; otmp; otmp = otmp->nobj) { #ifdef GOLDOBJ /* as above */ if (otmp->oclass == COIN_CLASS) continue; #endif if (--onum == 0) break; /* found the target */ } /* the !otmp case should never happen; picking an already cursed item happens--avoid "resists" message in that case */ if (!otmp || otmp->cursed) continue; /* next target */ if(otmp->oartifact && spec_ability(otmp, SPFX_INTEL) && rn2(10) < 8) { pline("%s!", Tobjnam(otmp, "VERB_WIDERSTEHEN")); /* EN pline("%s!", Tobjnam(otmp, "resist")); */ continue; } if(otmp->blessed) unbless(otmp); else curse(otmp); } update_inventory(); } #ifdef STEED /* treat steed's saddle as extended part of hero's inventory */ if (u.usteed && !rn2(4) && (otmp = which_armor(u.usteed, W_SADDLE)) != 0 && !otmp->cursed) { /* skip if already cursed */ if (otmp->blessed) unbless(otmp); else curse(otmp); if (!Blind) { pline("SUBJECT %s %s %s.", /* EN pline("%s %s %s.", */ genitivattribut_zu_wort(y_monnam(u.usteed), /* EN s_suffix(upstart(y_monnam(u.usteed))), */ cxname(otmp)), "VERB_LEUCHTEN", /* EN aobjnam(otmp, "glow"), */ hcolor(otmp->cursed ? NH_BLACK : (const char *)"ADJEKTIV_FARBE_BRAUN")); /* EN hcolor(otmp->cursed ? NH_BLACK : (const char *)"brown")); */ otmp->bknown = TRUE; } } #endif /*STEED*/ }
void rndcurse() /* curse a few inventory items at random! */ { int nobj = 0; int cnt, onum; struct obj *otmp; static const char mal_aura[] = "feel a malignant aura surround %s."; if (uwep && (uwep->oartifact == ART_MAGICBANE) && rn2(20)) { You(mal_aura, "the magic-absorbing blade"); return; } if(Antimagic) { shieldeff(u.ux, u.uy); You(mal_aura, "you"); } for (otmp = invent; otmp; otmp = otmp->nobj) { #ifdef GOLDOBJ /* gold isn't subject to being cursed or blessed */ if (otmp->oclass == COIN_CLASS) continue; #endif nobj++; } if (nobj) { for (cnt = rnd(6/((!!Antimagic) + (!!Half_spell_damage) + 1)); cnt > 0; cnt--) { onum = rnd(nobj); for (otmp = invent; otmp; otmp = otmp->nobj) { #ifdef GOLDOBJ /* as above */ if (otmp->oclass == COIN_CLASS) continue; #endif if (--onum == 0) break; /* found the target */ } /* the !otmp case should never happen; picking an already cursed item happens--avoid "resists" message in that case */ if (!otmp || otmp->cursed) continue; /* next target */ if(otmp->oartifact && spec_ability(otmp, SPFX_INTEL) && rn2(10) < 8) { pline("%s!", Tobjnam(otmp, "resist")); continue; } if(otmp->blessed) unbless(otmp); else curse(otmp); } update_inventory(); } #ifdef STEED /* treat steed's saddle as extended part of hero's inventory */ if (u.usteed && !rn2(4) && (otmp = which_armor(u.usteed, W_SADDLE)) != 0 && !otmp->cursed) { /* skip if already cursed */ if (otmp->blessed) unbless(otmp); else curse(otmp); if (!Blind) { pline("%s %s %s.", s_suffix(upstart(y_monnam(u.usteed))), aobjnam(otmp, "glow"), hcolor(otmp->cursed ? NH_BLACK : (const char *)"brown")); otmp->bknown = TRUE; } } #endif /*STEED*/ }
IndexBuffer::~IndexBuffer() { assert(buf); FREE(buf); unbless(); }
/* curse a few inventory items at random! */ void rndcurse() { int nobj = 0; int cnt, onum; struct obj *otmp; /*JP static const char mal_aura[] = "feel a malignant aura surround %s."; */ static const char mal_aura[] = "邪悪なオーラを%sの回りに感じた."; if (uwep && (uwep->oartifact == ART_MAGICBANE) && rn2(20)) { /*JP You(mal_aura, "the magic-absorbing blade"); */ You(mal_aura, "魔力を吸いとる刀"); return; } if (Antimagic) { shieldeff(u.ux, u.uy); /*JP You(mal_aura, "you"); */ You(mal_aura, "あなた"); } for (otmp = invent; otmp; otmp = otmp->nobj) { /* gold isn't subject to being cursed or blessed */ if (otmp->oclass == COIN_CLASS) continue; nobj++; } if (nobj) { for (cnt = rnd(6 / ((!!Antimagic) + (!!Half_spell_damage) + 1)); cnt > 0; cnt--) { onum = rnd(nobj); for (otmp = invent; otmp; otmp = otmp->nobj) { /* as above */ if (otmp->oclass == COIN_CLASS) continue; if (--onum == 0) break; /* found the target */ } /* the !otmp case should never happen; picking an already cursed item happens--avoid "resists" message in that case */ if (!otmp || otmp->cursed) continue; /* next target */ if (otmp->oartifact && spec_ability(otmp, SPFX_INTEL) && rn2(10) < 8) { /*JP pline("%s!", Tobjnam(otmp, "resist")); */ pline("%sは影響を受けない!", xname(otmp)); continue; } if (otmp->blessed) unbless(otmp); else curse(otmp); } update_inventory(); } /* treat steed's saddle as extended part of hero's inventory */ if (u.usteed && !rn2(4) && (otmp = which_armor(u.usteed, W_SADDLE)) != 0 && !otmp->cursed) { /* skip if already cursed */ if (otmp->blessed) unbless(otmp); else curse(otmp); if (!Blind) { #if 0 /*JP*/ pline("%s %s.", Yobjnam2(otmp, "glow"), hcolor(otmp->cursed ? NH_BLACK : (const char *) "brown")); #else pline("%sは%s輝いた.", xname(otmp), jconj_adj(hcolor(otmp->cursed ? NH_BLACK : (const char *)"茶色の"))); #endif otmp->bknown = TRUE; } } }