Destroy ships when player is defeated #1883
Conversation
967fd01 to
c2f69f8
Compare
|
Juast asking - this is not an addon, is it? I'm actually not sure if it should or not. Also if it should depend on if a player is defeated with destroying buildings or without. Guess this is just always which should be fine I guess, although this might stop ongoing sea attacks opposed to a normal attack which would still be going on. |
|
This is not an addon. When a player is defeated (no more military, warehouses/HQs) or he surrenders his ships are destroyed/removed. I don't see any issue with that and it's what I got out of #183
For people etc. they will wander around and eventually die, so why not do the same for ships as everything else will be gone too. |
|
Rebase necessary |
c2f69f8 to
9ce412b
Compare
|
@Flow86 *ping |
01092c5 to
1fb8f3e
Compare
This is run for every gameframe in "real mode" and required for some tests simulating e.g. a single step.
This is a corner case when destroying the harbor leads to defeat which leads to sinking ships potentially with wares to this building.
1fb8f3e to
9abcba1
Compare
| const auto shipsCopy = ships; // copy to avoid modification during iteration | ||
| for(auto* ship : shipsCopy) | ||
| ship->Sink(); | ||
|
|
There was a problem hiding this comment.
shouldn't this be an addon? in the original RttR, defeated ships were not destroyed
There was a problem hiding this comment.
Depends on - in the original only the player ever had ships, so it's a quite RttRish problem. Although I think just removing them is somewhat funny, since there is no burning/sinking animation. Maybe we should add some kind of animation (even the fire used for buildings does make sense I think).
There was a problem hiding this comment.
yep some burning/oil spill/whatever would be cool
There was a problem hiding this comment.
Using the small building fire as a vanishing, non-blocking object would work and not cause much trouble. Or do you want to make a new animation?
There was a problem hiding this comment.
if that works, I think thats a good thing.
There was a problem hiding this comment.
I think we don't need a new animation and would like the small building fire as you described it @Flamefire
Well, this is maybe not wanted by default. If you loose your HQ, you still can reconquer stuff right? but I assume then you not count as "defeated" yet, right? |
Co-authored-by: Flow86 <656249+Flow86@users.noreply.github.com>
|
IIRC attacking soldiers get "cancelled" when their home building is destroyed, at least up to a certain point in their conquering. "Defeated" means you have no more military buildings and no more storehouses. |
Well yeah it's hard to know what defeated in most cases means. For me a player counts as defeated, when he lost control. This can be either giving up or by game goal. Players who have no storehouse left, can still attack and are maybe in terms of winnig often defeated, but they can still attack and annoy you. So only if the player is really defeated (lost control) then they should lose their ships I think. |
That's our definition of defeated (in the code) so those players cannot attack you anymore. Hence it's safe to remove their ships, isn't it? |
yes |
As suggested in #183 ships will now be destroyed when a player is defeated or surrenders.
Requires: