--- [JSMaster]JSLASH'EM-0.0.7E7F3-J0.2.1/src/apply.c Sun Aug 3 10:44:36 2008 +++ torchfix/src/apply.c Tue Jan 13 20:34:50 2009 @@ -1762,23 +1762,56 @@ pline("残念ながら,火と水はまざらない."); return 0; } - if (obj->quan > 1L) { - otmp = obj; - obj = splitobj(otmp, 1L); - obj_extract_self(otmp); /* free from inv */ + + /*[Sakusha] new codes*/ + + /*消灯は装備しなくても出来るようにする*/ + if (obj->lamplit) { + if (artifact_light(obj)) { +/*JP + You_cant("snuff out %s.", yname(obj)); +*/ + pline("%sを吹き消すことができない.", yname(obj)); + return 0; + } else { + /*you can snuff out without wielding*/ +/*JP + You("snuff out %s.", yname(obj)); +*/ + pline("%sを吹き消した.", yname(obj)); + end_burn(obj, TRUE); + return 1; + } } + /* You can use a torch in either wielded weapon slot */ if (obj != uwep && (obj != uswapwep || !u.twoweap)) if (!wield_tool(obj, (const char *)0)) return 0; - use_lamp(obj); - /* shouldn't merge */ - if (otmp) -#if 0 /*JP*/ + + if (obj->quan > 1L) { + /* + * SLASH'EM bug 1957126 -- Cursed torch causes dungeon to collapse + * 2181262 -- Patch for cursed torches crash + * and arrange [Sakusha] + */ +/*JP + You("can only hold one lit torch."); +*/ + pline("火をつけるために松明を1本取り分けた."); + otmp = splitobj(obj, (obj->quan - 1L)); + obj_extract_self(otmp); /* free from inv */ + /* mustn't merge */ + obj->spe++; /*temp*/ +/*JP otmp = hold_another_object(otmp, "You drop %s!", -#else +*/ otmp = hold_another_object(otmp, "あなたは%sを落した!", -#endif doname(otmp), (const char *)0); + obj->spe--; /*reset*/ + } + + use_lamp(obj); + return 1; }