Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- in http://www.gitorious.org/crawl/crawl/blobs/stone_soup-0.10/crawl-ref/source/xom.cc, line 1214:
- potion_effect(pot, 150, false, false, false);
- in http://www.gitorious.org/crawl/crawl/blobs/stone_soup-0.10/crawl-ref/source/decks.cc, line 1496:
- static void _velocity_card(int power, deck_rarity_type rarity)
- {
- if (you.religion != GOD_CHEIBRIADOS)
- {
- const int power_level = get_power_level(power, rarity);
- if (power_level >= 2)
- {
- potion_effect(POT_SPEED, random2(power / 4));
- cast_swiftness(random2(power / 4));
- }
- else if (power_level == 1)
- potion_effect(POT_SPEED, random2(power / 4));
- else
- cast_swiftness(random2(power / 4));
- }
- else
- {
- simple_god_message(" protects you from inadvertent hurry.");
- }
- }
- In http://www.gitorious.org/crawl/crawl/blobs/stone_soup-0.10/crawl-ref/source/decks.cc , line 1572:
- static void _flight_card(int power, deck_rarity_type rarity)
- {
- const int power_level = get_power_level(power, rarity);
- // Assume something _will_ happen.
- bool success = true;
- if (power_level == 0)
- {
- if (!transform(random2(power/4), coinflip() ? TRAN_SPIDER : TRAN_BAT,
- true))
- {
- // Oops, something went wrong here (either because of cursed
- // equipment or the possibility of stat loss).
- success = false;
- }
- }
- else if (power_level >= 1)
- {
- cast_fly(random2(power/4));
- if (you.religion != GOD_CHEIBRIADOS)
- cast_swiftness(random2(power/4));
- else
- simple_god_message(" protects you from inadvertent hurry.");
- }
- if (power_level == 2) // Stacks with the above.
- {
- if (is_valid_shaft_level() && grd(you.pos()) == DNGN_FLOOR)
- {
- if (place_specific_trap(you.pos(), TRAP_SHAFT))
- {
- find_trap(you.pos())->reveal();
- mpr("A shaft materialises beneath you!");
- }
- }
- }
- if (one_chance_in(4 - power_level))
- potion_effect(POT_INVISIBILITY, random2(power)/4);
- else if (!success)
- canned_msg(MSG_NOTHING_HAPPENS);
- }
- In http://www.gitorious.org/crawl/crawl/blobs/stone_soup-0.10/crawl-ref/source/decks.cc , line 1948:
- static void _potion_card(int power, deck_rarity_type rarity)
- {
- const int power_level = get_power_level(power, rarity);
- potion_type pot_effects[] = {
- POT_AGILITY, POT_AGILITY, POT_BRILLIANCE,
- POT_BRILLIANCE, POT_MIGHT, POT_MIGHT,
- POT_CURING, POT_CURING, POT_CONFUSION,
- POT_SLOWING, POT_PARALYSIS
- };
- potion_type pot = RANDOM_ELEMENT(pot_effects);
- if (power_level >= 1 && coinflip())
- pot = (coinflip() ? POT_MAGIC : POT_INVISIBILITY);
- if (power_level >= 2 && coinflip())
- pot = (coinflip() ? POT_SPEED : POT_RESISTANCE);
- if (you.religion == GOD_CHEIBRIADOS && pot == POT_RESISTANCE)
- {
- simple_god_message(" protects you from inadvertent hurry.");
- pot = POT_WATER;
- }
- potion_effect(pot, random2(power/4));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement