Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix monster shield regeneration (#2325) #2326

Merged
merged 2 commits into from Dec 2, 2018

Conversation

Projects
None yet
3 participants
@Morlic-fo
Copy link
Contributor

commented Dec 1, 2018

Attempts to fix #2325: After moving the ship shield growth from C++ to a FOCS species effect, monster ships did not regenerate shields as they generally do not have a species.

If we provide a bugfix release, we probably want to include this patch.

MONSTER_SHIELD_REGENERATION
'''EffectsGroup // Increase shields to max when not in battle
scope = Source
activation = (Source.LastTurnActiveInBattle < CurrentTurn)

This comment has been minimized.

Copy link
@geoffthemedio

geoffthemedio Dec 1, 2018

Member

Should this also test that the ship is unowned to avoid duplicating the effect when an empire owns it?

This comment has been minimized.

Copy link
@Morlic-fo

Morlic-fo Dec 1, 2018

Author Contributor

Unowned seems to be the wrong condition.

The critical part is that the ship has no species (as ship shields are regenerated by a species effect). If a player owns it is irrelevant to this. Adding Unowned condition would actually break a variety of player-owned monsters.

Could check for no species instead, I guess. Or add a stacking group. Or just ignore the possible duplication as it has no noticeable impact.

@Morlic-fo Morlic-fo force-pushed the Morlic-fo:FixMonsterShields branch from b78d4c5 to eba7a19 Dec 1, 2018

Fix monster shield regeneration
After moving the ship shield growth from C++ to a focs species effect, monsters did not regenerate shields as they generally do not have a species.

@Morlic-fo Morlic-fo force-pushed the Morlic-fo:FixMonsterShields branch from eba7a19 to f40f12e Dec 1, 2018

@geoffthemedio

This comment has been minimized.

Copy link
Member

commented Dec 1, 2018

Looks reasonable

@Morlic-fo Morlic-fo merged commit 2f6a7c4 into freeorion:master Dec 2, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Morlic-fo Morlic-fo deleted the Morlic-fo:FixMonsterShields branch Dec 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.