From 5edce252688c1a94aab25d483d44d148097560f5 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 26befd7c25..5be911d15f 100644 --- a/doc/README.effects +++ b/doc/README.effects @@ -599,6 +599,21 @@ National_History specific city, nation produces. +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