Use puff of fire/ice tiles for ammo of flame/ice being fired.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6169 c06c8d41-db1a-0410-9941-cceddc491573
3FRPKD2JSN7RA2HKWAO3XV7MMKCIAMWIMU6JNJ452VZEUSXM6PWQC NJH4ORBZRAI33BVCS6PLBQJQ5PALHSF7Y2TXVNTE67S3H36M4DSQC 6CWMT6I76TMTHT7BVOVZJ7ATDMZ3VBKKICIRRZBOSGLHJMDS2DWQC KABMEHHPUS7RLDZ2A5ADC6GMYSBJ5OHD3WPUBDWBM22XWHB7X6WQC 25CH7HH4LKXFIZ75YNMXS3TSXO6O27DYSOPLOD45K4OCNFWLS4LQC LP5EK64IEM7AHNYQID4GGKOQJQNZLKY4DCCZN47SIUZ6IXAXH5UAC E3X5HVN5UN75OMTJA6JFQBNZ54P37NDZLZZF7EFBZZC45KR73YGAC FOQJ5S5WR7P7YMEWQ5Q4O7LTGLQ7LFVM4I2SG2Q7MIVC4PB2JHTQC FEKRY3DYIDLWVBLAZN7W2WFNEKZPCAHABXOSM6K5RLTH5WY2NODQC 4RJJ3ZFKNROSHTDWAM4ZCDQGM3R6SWGFRRAMML6GXPZ3466GLL5AC COLMJH3UIQFF4R5AV642OJK4HHGUIIPLNP5WGKLWWYNJV7ZGPI7AC C2PRXJYHDRF2642VDAUY76HJKCPQFGWDI6AM3SMCMYCHGWYDQXQQC JJULXW764V5C2HJKZNWQAEWB6QM5YZADD7ZCE35LYTBFEM6PMYCAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC JDM5R3HYGXKQKZWY35QZ2KOB24TFZ3FW2PCNXCRCMWG72AZC5ZXQC G5CA5STLILMQZO2ICHZTVTW76V6RMC7KWP4ELU7ANZBNXYSTWV7AC VXSORUQOM2VZA4CAZDC6KPAY373NQIN3UT7CXQXTRCY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HIYEXKFDEZPEU3XSQC NPCS4YLWULGF5Y5PIC2NYMKM3DUPGBLWU3SYVMUIFR25EIZ772BAC R5Q2OJMXNVK5RPXIKLTHHAOP67XOBB44AZKKZ2TOI3USPL6HACXAC RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC CWPA3Q5BG7KTTY6GX7CCS26PWC4UHJ47PUCMJX5BOJIP3FSTP2BQC TRZAZJJA5VQBJ65SO5H5DNSILIZEJHIZCBYEBHEATCT6ZSMWIFKQC WTBI53EKHGSNOQJ7DJVKJNKGW2VFFEDYTQATU53WFH3IAMSSGOZAC UFGBNLXSCQWIKCFRAPQNAMQOW3KGAIFXSNQ26PH5CXGF3DXXJ4SQC if ( type == OBJ_WANDS&& ((itm->flags & ISFLAG_KNOW_PLUSES )|| itm->plus2 == ZAPCOUNT_EMPTY) )
if (type == OBJ_WANDS&& ((itm->flags & ISFLAG_KNOW_PLUSES)|| itm->plus2 == ZAPCOUNT_EMPTY))
t == AMMO_BLOWGUN ? "blowguns" :t == AMMO_SLING ? "slings" :t == AMMO_BOW ? "bows" :t == AMMO_CROSSBOW ? "crossbows": "hand crossbows");
t == AMMO_BLOWGUN ? "blowgun" :t == AMMO_SLING ? "sling" :t == AMMO_BOW ? "bow" :t == AMMO_CROSSBOW ? "crossbow": "hand crossbow");
mprf("Quivering %s %s.", you.inv[slot].name(DESC_INVENTORY).c_str(),t == AMMO_THROW ? "as throwing weapon" :t == AMMO_BLOWGUN ? "for blowguns" :t == AMMO_SLING ? "for slings" :t == AMMO_BOW ? "for bows" :t == AMMO_CROSSBOW ? "for crossbows": "for hand crossbows");
mprf("Quivering %s for %s.", you.inv[slot].name(DESC_INVENTORY).c_str(),t == AMMO_THROW ? "throwing" :t == AMMO_BLOWGUN ? "blowguns" :t == AMMO_SLING ? "slings" :t == AMMO_BOW ? "bows" :t == AMMO_CROSSBOW ? "crossbows": "hand crossbows");
static bool _choose_book( item_def& book, int firstbook, int numbooks )
// book 0 = fire (CONJ_I, MINOR_MAGIC_I), 1 = ice (CONJ_II, MINOR_MAGIC_II),// 2 = summoning (MINOR_MAGIC_III)static char_choice_restriction _book_restriction(int booktype,bool summon_too = false)
int keyin = 0;clrscr();book.base_type = OBJ_BOOKS;book.quantity = 1;book.plus = 0;book.special = 1;char_choice_restriction book_restrictions[3];// Fireswitch (you.species)
switch (booktype)
case SP_OGRE:// Ogres are, of course, really bad at Fire and Ice, so it's usually// restricted, but if the summoning book comes into play unrestrict// those two because ogres are even *worse* at Summonings.if (numbooks < 3)book_restrictions[0] = CC_RESTRICTED;// else fall-throughcase SP_HUMAN:case SP_HIGH_ELF:case SP_GREY_ELF:case SP_DEEP_ELF:case SP_SLUDGE_ELF:case SP_MOUNTAIN_DWARF:case SP_HILL_ORC:case SP_HALFLING:case SP_GNOME:case SP_KOBOLD:case SP_NAGA:case SP_OGRE_MAGE:case SP_KENKU:case SP_DEMONSPAWN:book_restrictions[0] = CC_UNRESTRICTED;
case 0: // Fireswitch (you.species){case SP_OGRE:// Ogres are, of course, really bad at Fire and Ice, so it's usually// restricted, but if the summoning book comes into play unrestrict// those two because ogres are even *worse* at Summonings.if (!summon_too)return (CC_RESTRICTED);// else fall-throughcase SP_HUMAN:case SP_HIGH_ELF:case SP_GREY_ELF:case SP_DEEP_ELF:case SP_SLUDGE_ELF:case SP_MOUNTAIN_DWARF:case SP_HILL_ORC:case SP_HALFLING:case SP_GNOME:case SP_KOBOLD:case SP_NAGA:case SP_OGRE_MAGE:case SP_KENKU:case SP_DEMONSPAWN:return (CC_UNRESTRICTED);default:return (CC_RESTRICTED);}
default:book_restrictions[0] = CC_RESTRICTED;}
case 1: // Iceswitch (you.species){case SP_OGRE_MAGE:if (!summon_too)return (CC_RESTRICTED);// else fall-throughcase SP_HUMAN:case SP_HIGH_ELF:case SP_GREY_ELF:case SP_DEEP_ELF:case SP_SLUDGE_ELF:case SP_HILL_ORC:case SP_MERFOLK:case SP_HALFLING:case SP_GNOME:case SP_KOBOLD:case SP_NAGA:case SP_OGRE:case SP_GHOUL:case SP_VAMPIRE:return (CC_UNRESTRICTED);
// Iceswitch (you.species){case SP_OGRE_MAGE:if (numbooks < 3)book_restrictions[0] = CC_RESTRICTED;// else fall-throughcase SP_HUMAN:case SP_HIGH_ELF:case SP_GREY_ELF:case SP_DEEP_ELF:case SP_SLUDGE_ELF:case SP_HILL_ORC:case SP_MERFOLK:case SP_HALFLING:case SP_GNOME:case SP_KOBOLD:case SP_NAGA:case SP_OGRE:case SP_GHOUL:case SP_VAMPIRE:book_restrictions[1] = CC_UNRESTRICTED;
default:return (CC_RESTRICTED);}
default:book_restrictions[1] = CC_RESTRICTED;
case 2: // Summoningswitch (you.species){case SP_HUMAN:case SP_GREY_ELF:case SP_DEEP_ELF:case SP_SLUDGE_ELF:case SP_MERFOLK:case SP_GNOME:case SP_KOBOLD:case SP_NAGA:case SP_OGRE_MAGE:case SP_KENKU:case SP_DEMONSPAWN:case SP_VAMPIRE:return (CC_UNRESTRICTED);break;default:if (player_genus(GENPC_DRACONIAN))return (CC_UNRESTRICTED);elsereturn (CC_RESTRICTED);}
// Summoningswitch (you.species){case SP_HUMAN:case SP_GREY_ELF:case SP_DEEP_ELF:case SP_SLUDGE_ELF:case SP_MERFOLK:case SP_GNOME:case SP_KOBOLD:case SP_NAGA:case SP_OGRE_MAGE:case SP_KENKU:case SP_DEMONSPAWN:case SP_VAMPIRE:book_restrictions[2] = CC_UNRESTRICTED;break;
static bool _choose_book( item_def& book, int firstbook, int numbooks ){int keyin = 0;clrscr();book.base_type = OBJ_BOOKS;book.quantity = 1;book.plus = 0;book.special = 1;
default:if (player_genus(GENPC_DRACONIAN))book_restrictions[2] = CC_UNRESTRICTED;elsebook_restrictions[2] = CC_RESTRICTED;}
const bool summons_too = (numbooks == 3);char_choice_restriction book_restrictions[3];for (int i = 0; i < numbooks; i++)book_restrictions[i] = _book_restriction(i, summons_too);
/*// If ammo was chosen via 'fi', it's not supposed to get quivered.// Otherwise, if the user chose different ammo, quiver it.// Same for items selected in tile mode.if (was_chosen || !beh.selected_from_inventory){you.m_quiver->on_item_fired(you.inv[beh.m_slot], beh.chosen_ammo);}else{you.m_quiver->on_item_fired_fi(you.inv[beh.m_slot]);}*/
// Basically does what throwing used to do: throw an item without changing// the quiver.void throw_item_no_quiver(){if (_fire_warn_if_impossible()){flush_input_buffer( FLUSH_ON_FAILURE );return;}if (inv_count() < 1){canned_msg(MSG_NOTHING_CARRIED);return;}std::string warn;int slot = _fire_prompt_for_item(warn);if (slot == -1){canned_msg(MSG_OK);return;}if (!_fire_validate_item(slot, warn)){mpr(warn.c_str());return;}// Okay, item is valid.bolt beam;throw_it( beam, slot );}
// [dshaligram] Branded arrows are much stronger.dice_mult = (dice_mult * 150) / 100;
if (ammo_brand != SPMSL_ICE && bow_brand != SPWPN_FROST){#ifdef USE_TILE// Mark brand for tile output.if (ammo_brand != SPMSL_FLAME)set_item_ego_type( item, OBJ_MISSILES, SPMSL_FLAME );#endif// [dshaligram] Branded arrows are much stronger.dice_mult = (dice_mult * 150) / 100;
pbolt.name += "flame";pbolt.colour = RED;pbolt.type = dchar_glyph(DCHAR_FIRED_BOLT);pbolt.thrower = KILL_YOU_MISSILE;pbolt.aux_source.clear();
pbolt.name += "flame";pbolt.colour = RED;pbolt.type = dchar_glyph(DCHAR_FIRED_BOLT);pbolt.thrower = KILL_YOU_MISSILE;pbolt.aux_source.clear();}#ifdef USE_TILEelseset_item_ego_type( item, OBJ_MISSILES, SPMSL_NORMAL );#endif
// [dshaligram] Branded arrows are much stronger.dice_mult = (dice_mult * 150) / 100;
if (ammo_brand != SPMSL_FLAME && bow_brand != SPWPN_FLAME){#ifdef USE_TILE// Mark brand for tile output.if (ammo_brand != SPMSL_ICE)set_item_ego_type( item, OBJ_MISSILES, SPMSL_ICE );#endif
pbolt.flavour = BEAM_COLD;pbolt.name = "bolt of ";
// [dshaligram] Branded arrows are much stronger.dice_mult = (dice_mult * 150) / 100;pbolt.flavour = BEAM_COLD;pbolt.name = "bolt of ";
pbolt.name += "frost";pbolt.colour = WHITE;pbolt.type = dchar_glyph(DCHAR_FIRED_BOLT);pbolt.thrower = KILL_YOU_MISSILE;pbolt.aux_source.clear();
pbolt.name += "frost";pbolt.colour = WHITE;pbolt.type = dchar_glyph(DCHAR_FIRED_BOLT);pbolt.thrower = KILL_YOU_MISSILE;pbolt.aux_source.clear();}#ifdef USE_TILEelseset_item_ego_type( item, OBJ_MISSILES, SPMSL_NORMAL );#endif
combat to mindless bashing. When wielding some launcher, the 'f' commandwill fire appropriate missiles. See the section on Targeting in theItems Chapter for more on this. Likewise, many magicians will prefer touse spells from a safe distance. They can use the 'Z' command to cast
combat to mindless bashing. When wielding some launcher, the 'f' and 'F'commands will fire appropriate missiles. See the section on Targeting inthe Items Chapter for more on this. Likewise, many magicians will preferto use spells from a safe distance. They can use the 'z' command to cast
on the main screen beneath your wielded weapon. It is either theprevious item you fired, or the "best" available lot, depending on anoption setting.
on the main screen beneath your wielded weapon. The quivered itemwill always be what Crawl thinks is most likely to be what you want.Thus it will either be an item you previously chose and fired (with'f') or directly quivered (with 'Q'), or the item in your inventorythat ranks highest in fire_order - if there are several of similarorder the one with the lowest inventory slot is chosen.