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PHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
S34LKQDIQJLIWVIPASOJBBZ6ZCXDHP5KPS7TRBZJSCDRVNCLK6UAC
SIDH2P7NBIG5KEOE27XHD3ZT2NQ2OJZFN6VZXWNWYFFY5YVXSSVQC
AUXVWXWIFSTWFA6VZXN2FMG7FQEKRZVV6MD32VQQ7J2RKCXHAVGAC
UB67ZWGT7FOPKZ7SO5PAO3V4PUBPWPWXKQIQIUABNB533XP4JUMQC
3DQXSE4YGFBBDUWK4YEOFWW4UPWILWELFSLP37SL6BERGAZJC5YAC
if (done_first_message)
mpr("Where would you like to place the cloud?", MSGCH_PROMPT);
else
{
mpr("You cast a flaming cloud spell! But where?", MSGCH_PROMPT);
done_first_message = true;
}
mpr("You can't ignite solid rock!");
return (false);
}
direction( spelld, DIR_TARGET, TARG_ENEMY, -1, false, false, false );
if (!spelld.isValid)
{
canned_msg(MSG_OK);
return (false);
}
if (trans_wall_blocking(spelld.target))
const int cloud = env.cgrid(where);
if (cloud != EMPTY_CLOUD && env.cloud[cloud].type != CLOUD_FIRE)
{
mpr("There's already a cloud there!");
return (false);
}
// Note that self-targeting is handled by SPFLAG_NOT_SELF.
monsters *monster = monster_at(where);
if (monster)
{
if (you.can_see(monster))
if (spelld.target == you.pos())
{
mpr("You can't place the cloud here!");
continue;
}
const int cloud = env.cgrid(spelld.target);
if (grid_is_solid(grd(spelld.target))
|| monster_at(spelld.target)
|| (cloud != EMPTY_CLOUD && env.cloud[cloud].type != CLOUD_FIRE))
{
mpr( "There's already something there!" );
continue;
}
else if (cloud != EMPTY_CLOUD)
{
// Reinforce the cloud - but not too much.
mpr( "The fire roars with new energy!" );
const int extra_dur = 2 + std::min(random2(pow) / 2, 20);
env.cloud[cloud].decay += extra_dur * 5;
env.cloud[cloud].set_whose(KC_YOU);
return (true);
}
break;
if (cloud != EMPTY_CLOUD)
{
// Reinforce the cloud - but not too much.
// It must be a fire cloud from a previous test.
mpr("The fire roars with new energy!");
const int extra_dur = 2 + std::min(random2(pow) / 2, 20);
env.cloud[cloud].decay += extra_dur * 5;
env.cloud[cloud].set_whose(KC_YOU);
}
else
{
const int durat = std::min(5 + (random2(pow)/2) + (random2(pow)/2), 23);
place_cloud(CLOUD_FIRE, where, durat, KC_YOU);