From 3e737e479374fa1bf6be5da3b26b9651caf64870 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Fri, 12 Mar 2021 13:37:48 +0100 Subject: [PATCH] Document Lua's effect integration. See osdn #41744 --- doc/README.effects | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/README.effects b/doc/README.effects index 02d4e3ff1f..17fbd9c30a 100644 --- a/doc/README.effects +++ b/doc/README.effects @@ -652,6 +652,21 @@ Infra_Points are negative after all cities have been processed, they are set to 0. +Effects and Lua +=============== +Lua has some integration with effects. The effects module allows you to +get an effect type's current value given that it is evaluated against the +entities you specify. Only a subset of the entities a hard coded effect can +be evaluated against is supported. An effect type's value is the sum of the +effects of that type from effects.ruleset whos requirement vectors are +fulfilled given the entities you specified. + +Example +------- +Get the value of Tech_Parasite for the player +effects.player_bonus(find.player(0), "Tech_Parasite") + + Details about requirement types =============================== -- 2.20.1