talchas
Prince
- Joined
- Jan 3, 2006
- Messages
- 428
I designed this mod so that you can do whatever you want with it - I didn't include any restrictions like that for this reason. You could add a restriction in several ways:
1. You could just set the moves on the unit to 0 when you click heal and then require 1+ moves left or it is disabled.
2. You could allow only 1 healing per unit per turn by recording the fact that the heal ability has been used in the scriptData and then clearing this flag for all of a player's units in CvEventManager.onBeginPlayerTurn (or whatever its called). Then check this flag in the scriptData.
3. Similar to 2, but instead just record the turn number each time it heals and only let it work if the turn number is different.
1. You could just set the moves on the unit to 0 when you click heal and then require 1+ moves left or it is disabled.
2. You could allow only 1 healing per unit per turn by recording the fact that the heal ability has been used in the scriptData and then clearing this flag for all of a player's units in CvEventManager.onBeginPlayerTurn (or whatever its called). Then check this flag in the scriptData.
3. Similar to 2, but instead just record the turn number each time it heals and only let it work if the turn number is different.