mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 17:28:57 +07:00
Ruins stat gifts modified by game speed
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"name": "discover cultural artifacts",
|
"name": "discover cultural artifacts",
|
||||||
"notification": "We have discovered cultural artifacts in the ruins! (+20 culture)",
|
"notification": "We have discovered cultural artifacts in the ruins! (+20 culture)",
|
||||||
"uniques": ["Gain [20] [Culture]"],
|
"uniques": ["Gain [20] [Culture] <(modified by game speed)>"],
|
||||||
"color": "#cf8ff7"
|
"color": "#cf8ff7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -31,7 +31,7 @@
|
|||||||
{
|
{
|
||||||
"name": "a stash of gold",
|
"name": "a stash of gold",
|
||||||
"notification": "", // trigger notification only
|
"notification": "", // trigger notification only
|
||||||
"uniques": ["Gain [50]-[100] [Gold]"],
|
"uniques": ["Gain [50]-[100] [Gold] <(modified by game speed)>"],
|
||||||
"color": "#ffeb7f"
|
"color": "#ffeb7f"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"name": "discover cultural artifacts",
|
"name": "discover cultural artifacts",
|
||||||
"notification": "We have discovered cultural artifacts in the ruins! (+20 culture)",
|
"notification": "We have discovered cultural artifacts in the ruins! (+20 culture)",
|
||||||
"uniques": ["Gain [20] [Culture]"],
|
"uniques": ["Gain [20] [Culture] <(modified by game speed)>"],
|
||||||
"color": "#cf8ff7"
|
"color": "#cf8ff7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -31,7 +31,7 @@
|
|||||||
{
|
{
|
||||||
"name": "a stash of gold",
|
"name": "a stash of gold",
|
||||||
"notification": "", // trigger notification only
|
"notification": "", // trigger notification only
|
||||||
"uniques": ["Gain [50]-[100] [Gold]"],
|
"uniques": ["Gain [50]-[100] [Gold] <(modified by game speed)>"],
|
||||||
"color": "#ffeb7f"
|
"color": "#ffeb7f"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -672,8 +672,9 @@ object UniqueTriggerActivation {
|
|||||||
) return null
|
) return null
|
||||||
|
|
||||||
|
|
||||||
val finalStatAmount = (tileBasedRandom.nextInt(unique.params[0].toInt(), unique.params[1].toInt()) *
|
val randomValue = tileBasedRandom.nextInt(unique.params[0].toInt(), unique.params[1].toInt())
|
||||||
civInfo.gameInfo.speed.statCostModifiers[stat]!!).roundToInt()
|
val finalStatAmount = if (unique.isModifiedByGameSpeed()) (randomValue * civInfo.gameInfo.speed.statCostModifiers[stat]!!).roundToInt()
|
||||||
|
else randomValue
|
||||||
|
|
||||||
return {
|
return {
|
||||||
val stats = Stats().add(stat, finalStatAmount.toFloat())
|
val stats = Stats().add(stat, finalStatAmount.toFloat())
|
||||||
|
@ -810,7 +810,7 @@ enum class UniqueType(
|
|||||||
|
|
||||||
OneTimeGainResource("Instantly gain [amount] [stockpile]", UniqueTarget.Triggerable, flags = setOf(UniqueFlag.AcceptsSpeedModifier)),
|
OneTimeGainResource("Instantly gain [amount] [stockpile]", UniqueTarget.Triggerable, flags = setOf(UniqueFlag.AcceptsSpeedModifier)),
|
||||||
OneTimeGainStat("Gain [amount] [stat]", UniqueTarget.Triggerable, flags = setOf(UniqueFlag.AcceptsSpeedModifier)),
|
OneTimeGainStat("Gain [amount] [stat]", UniqueTarget.Triggerable, flags = setOf(UniqueFlag.AcceptsSpeedModifier)),
|
||||||
OneTimeGainStatRange("Gain [amount]-[amount] [stat]", UniqueTarget.Triggerable),
|
OneTimeGainStatRange("Gain [amount]-[amount] [stat]", UniqueTarget.Triggerable, flags = setOf(UniqueFlag.AcceptsSpeedModifier)),
|
||||||
OneTimeGainPantheon("Gain enough Faith for a Pantheon", UniqueTarget.Triggerable),
|
OneTimeGainPantheon("Gain enough Faith for a Pantheon", UniqueTarget.Triggerable),
|
||||||
OneTimeGainProphet("Gain enough Faith for [amount]% of a Great Prophet", UniqueTarget.Triggerable),
|
OneTimeGainProphet("Gain enough Faith for [amount]% of a Great Prophet", UniqueTarget.Triggerable),
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user