Ticket #41813

"PlayerState" requirement

오픈 날짜: 2021-03-19 23:07 마지막 업데이트: 2024-01-04 07:39

Reporter:
소유자:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
2

Details

Would be good to have a new req type for player-wide special states. Possible state names:

  • "RevoltedThisTurn" - ​some governments provide turn-end bonuses (e.g. increased trade) and another mid-turn ones (e.g. increased veteran chances). Player that has Statue of Liberty or just have finished revolen this turn can change governments for free and exploit it a lot, so let some bonuses be available only when the dust settles (note: AI democracy regulary "fails" for city mismanagement, as long as AI has handicap for it we should not test this req to it in these cases.)
  • "HasCapital" - for mandatory reqs for certain actions but might be used in other cases. BTW primary capital site worth caching.
  • "IsBarbarian" (and/or "IsLandBarbarian", "IsSeaBarbarian", "IsAnimal") - ​to replace unreliable "NationGroup", "Barbarian" req for testing if a player is a barbarian, since in Longturn people who take cool Pirates flag regulary suffer from unwanted effects.
  • "ScienceNonNegative" - ​for combining with bulbs cost of tech stealth, disable tech stealth when you have yet to sort out what you have stolen before.

edit: Also, considering civil war effect for civ1/civ2 rulesets compatibility, we should make local ranged requirement "HasMore(Less)Cities" and "HasMore(Less)Score" (that tests if the capital conqueror passed as other_player is in range), and similar local range variant for "IsBarbarian" (maybe other values also should test other_player when applied as "Local")

Ticket History (3/16 Histories)

2021-03-19 23:07 Updated by: ihnatus
  • New Ticket ""PlayerState" requirement" created
2021-03-23 05:05 Updated by: ihnatus
  • Details Updated
2021-03-23 05:18 Updated by: cazfi
댓글 올리기

Longturn people who take cool Pirates flag regulary suffer from unwanted effects.

I think that is intentional local modification by LT to make Pirates playable while they still are barbarians.

2021-11-08 09:41 Updated by: cazfi
댓글 올리기

Reply To ihnatus

Player that has Statue of Liberty or just have finished revolen this turn can change governments for free and exploit it a lot, so let some bonuses be available only when the dust settles

I think that for this the engine should enforce some rules, and not leave it to ruleset to plug every possible exploit. This could work similar to multiplier changes that can be chosen during the turn freely, but are activated only at turn change (it has two variables; one that is the really active value, and second that tells what value user wants to activate in the next turn change)
2022-01-12 02:16 Updated by: cazfi
댓글 올리기

Reply To cazfi

Reply To ihnatus

Player that has Statue of Liberty or just have finished revolen this turn can change governments for free and exploit it a lot, so let some bonuses be available only when the dust settles

I think that for this the engine should enforce some rules, and not leave it to ruleset to plug every possible exploit. This could work similar to multiplier changes that can be chosen during the turn freely, but are activated only at turn change (it has two variables; one that is the really active value, and second that tells what value user wants to activate in the next turn change)

-> #43604

2022-01-12 02:17 Updated by: cazfi
2022-08-27 23:25 Updated by: cazfi
댓글 올리기

Somewhat overlapping (but not replacement) idea would be "PlayerFlag" requirement type. The benefit of PlayerFlag over PlayerState would be that requirement system would automatically gain access to each new flag added (no further implementation needed once we have the generic flag checking in place). Each PlayerState type would need to be implemented separately.

2023-10-01 14:07 Updated by: cazfi
댓글 올리기

Reply To cazfi

Somewhat overlapping (but not replacement) idea would be "PlayerFlag" requirement type.

-> #45666

2023-10-16 13:51 Updated by: cazfi
  • 소유자 Update from (None) to cazfi
  • Resolution Update from None to Accepted
댓글 올리기

Attached patch that supports just "Barbarian" state. Other states to be added in separate tickets.

2023-10-16 14:01 Updated by: cazfi
댓글 올리기

New version, with README.effects changes added.

2023-10-22 18:53 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed
2023-10-22 19:03 Updated by: cazfi
댓글 올리기

"HasCapital" -> #48886
"PlayerState" "Barbarian" ruleset changes -> #48887

2023-12-29 06:57 Updated by: cazfi
댓글 올리기

Reply To ihnatus

* "ScienceNonNegative" - ​for combining with bulbs cost of tech stealth, disable tech stealth when you have yet to sort out what you have stolen before.

Maybe separate "MinAccumulatedBulbs" requirement type would be more generally usable?

2024-01-04 07:39 Updated by: cazfi
댓글 올리기

Reply To cazfi

Reply To ihnatus

* "ScienceNonNegative" - ​for combining with bulbs cost of tech stealth, disable tech stealth when you have yet to sort out what you have stolen before.

Maybe separate "MinAccumulatedBulbs" requirement type would be more generally usable?

-> https://redmine.freeciv.org/issues/122

Edit

Please login to add comment to this ticket » Login