Actions, counters and effects

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Post Reply
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Actions, counters and effects

Post by Lachu »

It could be fun to provide automated actions and some counters, like loyalty or happiness.

When loyalty is very small, citizens will riot and create own nationality.

We only need to create riot action for city. Player could define in target reqs domestic or foreign requirement. So, Imagine player set domestic reqs. Also, it sets riot as auto-preformed action.

But in case, it is not auto-performed and foreign req is set, other player could use this action on city.

Also, allow to increase/decrease value of counter by amount of virtual effect. Player could declare own effect type, like HOW_MANY_HP_TAKE and define effects of that type. Value was summarized by value field of each HOW_MANY_HP_TAKE, where each condition was meet. This calculation was performed, when action connected with this effect was performed, for example:

[action_kill_enemy]
type ="dec_counter"
ui_name = "attack"
effect_type_value = "HOW_MANY_HP_TAKE" ; effects, which be use to calculate of value to modify (add/subs) victim's HP counter
actor_reqs = ... ; unit, which could do the action
target_reqs = ... ; victim unit condition, which must meet
entity_name = "HP" ; target counter

We could extend this to some virtual actions:
[action_kill_enemy]
type ="remove_unit
auto_perform = true
actor_reqs = {
"type", "name", "range"
"action", "take_hp", "unit"
"Counter", "action_attack_step_2", "Unit"
}
target_reqs = {
"type", "name", "range"
"HP", "0", "unit"
}

[action_take_hp_enemy]
type ="dec_counter"
effect_type_value = "HOW_MANY_HP_TAKE" ; effects, which be use to calculate of value to modify (add/subs) victim's HP counter
actor_reqs = {
"type", "name", "range"
"action", "take_hp", "unit"
"Counter", "action_attack_step_1, "Unit"
}

target_reqs = ... ; victim unit condition, which must meet
entity_name = "HP" ; target counter

[action_attack]
name = "take_hp"
type = "none"
ui_name = "attack"
effect_type_value = "One_Effect"
entity_name = "action_attack_step_1"
actors_reqs = {
"type", "name", "range"
"UnitType", "Warriors", "Unit"
}
target_reqs = {
"type", "name", "range"
"UnitType", "Warriors", "Unit"
}

What do you think?

In my opinion, it turns a lot of possibilities. This actions to modify actions and action auto-perfomed allows us to define multi-step actions. Maybe religious could be implemented in near future? Own combat systems, etc. ?
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Actions, counters and effects

Post by Lachu »

I miss:

[action_take_hp_enemy_next]
type ="inc"
effect_type_value = "Step_one_effect" ; effects, which be use to calculate of value to modify (add/subs) victim's HP counter
actor_reqs = {
"type", "name", "range"
"action", "take_hp", "unit"
"Counter", "action_attack_step_1, "Unit"
}
entity_name = "action_attack_step_2" ; target counter

We will save counters until each possible actions (related to current unit or city, etc.) can be done. When it was true, we override counter value which value set by action.
Post Reply