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

Make nukes destroy infrastructure #1456

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

lmoureaux
Copy link
Contributor

@lmoureaux lmoureaux commented Nov 5, 2022

Add an effect Nuke_Infrastructure_Pct that allows the destruction of extras located within the blast area of nuclear weapons. Destroying infrastructure makes large-scale nuclear warfare more difficult because roads and rails need be rebuilt before tanks can ride them again to reach the next city.

This is a rewrite of 8691fa8e38c56c6fa066c77aadf1eab1df5e620b in the 2.6 LT repo. Extras of category "Infra" can potentially be destroyed in nuclear blasts, with an effect-configurable chance. Contrary to the original commit, hidden extras can be blasted away just like they can be (target-)pillaged; this can be prevented with suitable rmreqs.

See #1155.

Test Plan

Add the following to your fav ruleset and drop a nuke:

[effect_nuke_infrastructure_pct]
type    = "Nuke_Infrastructure_Pct"
value   = 50

About half of the extras within the 3x3 blast radius should be gone (unless SDI went in action).

Add an effect Nuke_Infrastructure_Pct that allows the destruction of extras
located within the blast area of nuclear weapons. Destroying infrastructure
makes large-scale nuclear warfare more difficult because roads and rails need
be rebuilt before tanks can ride them again to reach the next city.

This is a rewrite of 8691fa8e38c56c6fa066c77aadf1eab1df5e620b in the 2.6 LT
repo. Extras of category "Infra" can potentially be destroyed in nuclear
blasts, with an effect-configurable chance. Contrary to the original commit,
hidden extras can be blasted away just like they can be (target-)pillaged; this
can be prevented with suitable rmreqs.

See longturn#1155.
@lmoureaux
Copy link
Contributor Author

It's broken, I have a fix, will push once my Internet works again

@jwrober
Copy link
Collaborator

jwrober commented Nov 8, 2022

Code seems reasonable. How do I test this?

@lmoureaux
Copy link
Contributor Author

See the Test plan above 😉 I used the tileset demo since it has a nuke ready to be fired

@jwrober
Copy link
Collaborator

jwrober commented Nov 8, 2022

LoL, oops. I didn't read carefully enough.

Copy link
Collaborator

@jwrober jwrober left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kablooie!

@jwrober jwrober merged commit 3e3f5ec into longturn:master Nov 8, 2022
@Lexxie9952
Copy link

Hi everyone, are we still re-inventing wheels? It seems so. I talked to other open-source people they said ... (?!!!?) Anyway, scared to talk here shut down last time for trying to get a consensus on fuel unit upgrade.

@Lexxie9952
Copy link

obviously of course because nukes destroy infra first at FCW but the worst thing for all freeciv is if certain people do not meet minds, because you apparently think we can compete with $149M budget games

@lmoureaux lmoureaux deleted the feature/nukes branch November 9, 2022 11:18
@lmoureaux
Copy link
Contributor Author

If you want FCW features to be ported over to FC21, please open PRs and/or issues.

@longturn longturn locked as resolved and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants