Skip to content

Commit

Permalink
Disperse clouds under player when evoking wind blasts
Browse files Browse the repository at this point in the history
[Closes #612 PR. Removed the extra message for it, as it was placed in a weird
order and doesn't seem entirely necessary. - MarvinPA]
  • Loading branch information
jmbjr authored and Chris Campbell committed Sep 15, 2017
1 parent 984ae92 commit 0785366
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crawl-ref/source/evoke.cc
Expand Up @@ -1336,7 +1336,7 @@ void wind_blast(actor* agent, int pow, coord_def target, bool card)

// Now move clouds
vector<coord_def> cloud_list;
for (distance_iterator di(agent->pos(), true, true, radius + 2); di; ++di)
for (distance_iterator di(agent->pos(), true, false, radius + 2); di; ++di)
{
if (cloud_at(*di)
&& cell_see_cell(agent->pos(), *di, LOS_SOLID)
Expand All @@ -1355,6 +1355,12 @@ void wind_blast(actor* agent, int pow, coord_def target, bool card)
int dist = cloud_list[i].distance_from(agent->pos());
int push = (dist > 5 ? 2 : dist > 2 ? 3 : 4);

if (dist == 0 && agent->is_player())
{
delete_cloud(agent->pos());
break;
}

for (unsigned int j = 0;
j < wind_beam.path_taken.size() - 1 && push;
++j)
Expand Down

0 comments on commit 0785366

Please sign in to comment.