Skip to content

Commit 9607dea

Browse files
Energia Change
Energia Had a cap of 20 tags to stop the game from being unplayable due to massive tag spam but it is ineffective, so I'm doing a different energia cap -Energia now stops creating tags if there are already more then 40 -If the amount of tags created by Energia would exceed 40 tags, Energia will reduce the amount of copies created to not exceed 40 (or creates 0 tags if it can't)
1 parent 57196f0 commit 9607dea

File tree

10 files changed

+83
-25
lines changed

10 files changed

+83
-25
lines changed

items/exotic.lua

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,27 +1098,31 @@ local energia = {
10981098
config = { extra = { tags = 1, tag_mod = 1 } },
10991099
loc_vars = function(self, info_queue, center)
11001100
return {
1101-
vars = { math.min(20, center.ability.extra.tags), center.ability.extra.tag_mod },
1101+
vars = { math.min(center.ability.extra.tags,40), center.ability.extra.tag_mod },
11021102
}
11031103
end,
11041104
rarity = "cry_exotic",
11051105
cost = 50,
11061106
atlas = "atlasexotic",
11071107
calculate = function(self, card, context)
11081108
if context.cry_add_tag then
1109-
local t = math.min(20, card.ability.extra.tags)
1109+
local value = #G.GAME.tags or 0
1110+
local t = math.min(40 - value,card.ability.extra.tags)
11101111
card.ability.extra.tags = card.ability.extra.tags + card.ability.extra.tag_mod
1111-
if card.ability.extra.tags < 20 then
1112+
if t > 0 then
11121113
card_eval_status_text(
11131114
card,
11141115
"extra",
11151116
nil,
11161117
nil,
11171118
nil,
1118-
{ message = localize("k_upgrade_ex"), colour = G.C.DARK_EDITION }
1119-
)
1119+
{
1120+
message = localize({ type = "variable", key = card.ability.extra.tags == 1 and "a_tag" or "a_tags", vars = { t } })[1],
1121+
colour = G.C.DARK_EDITION,
1122+
}
1123+
)
11201124
end
1121-
return { tags = t }
1125+
return { tags = math.max(t,0) }
11221126
end
11231127
end,
11241128
cry_credits = {

items/misc_joker.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ local pickle = {
564564
nil,
565565
nil,
566566
{
567-
message = "+"..localize({ type = "variable", key = "a_tag" .. (card.ability.extra.tags > 1 and "s" or ""), vars = { card.ability.extra.tags } })[1],
567+
message = localize({ type = "variable", key = card.ability.extra.tags == 1 and "a_tag" or "a_tags", vars = { card.ability.extra.tags } })[1],
568568
colour = G.C.FILTER,
569569
}
570570
)
@@ -580,7 +580,7 @@ local pickle = {
580580
nil,
581581
nil,
582582
{
583-
message = "-"..localize({ type = "variable", key = "a_tag" .. (card.ability.extra.tags > 1 and "s" or ""), vars = { card.ability.extra.tags } })[1],
583+
message = localize({ type = "variable", key = card.ability.extra.tags == 1 and "a_tag_minus" or "a_tags_minus", vars = { card.ability.extra.tags } })[1],
584584
colour = G.C.FILTER,
585585
}
586586
)

items/test.lua

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ local test = {
2525
loc_vars = function(self, info_queue, center)
2626
local gameset = Card.get_gameset(center)
2727
if gameset == 'disabled' then gameset = 'mainline' end --still show description
28-
return { vars = { center.ability.extra.chips }, key = "j_cry_test_"..gameset }
28+
return {
29+
vars = { center.ability.extra.chips },
30+
key = "j_cry_test_"..gameset
31+
}
2932
end,
3033
calculate = function(self, card, context)
3134
local gameset = Card.get_gameset(card)
@@ -50,6 +53,49 @@ local test = {
5053
}
5154
},
5255
}
56+
local test2 = {
57+
object_type = "Joker",
58+
name = "ABC",
59+
key = 'abc',
60+
loc_txt = {
61+
name = 'ABC',
62+
text = {}
63+
},
64+
pos = { x = 0, y = 0 },
65+
cost = 1,
66+
rarity = 1,
67+
unlocked = true,
68+
discovered = false,
69+
blueprint_compat = true,
70+
eternal_compat = true,
71+
perishable_compat = true,
72+
calculate = function(self, card, context)
73+
if context.retrigger_joker_check and not context.retrigger_joker then
74+
if card.T.x + card.T.w / 2 > context.other_card.T.x + context.other_card.T.w / 2 then
75+
return {
76+
message = localize("k_again_ex"),
77+
repetitions = 1,
78+
card = card,
79+
}
80+
end
81+
elseif context.other_joker and card ~= context.other_joker then
82+
if card.T.x + card.T.w / 2 < context.other_joker.T.x + context.other_joker.T.w / 2 then
83+
if not Talisman.config_file.disable_anims then
84+
G.E_MANAGER:add_event(Event({
85+
func = function()
86+
context.other_joker:juice_up(0.5, 0.5)
87+
return true
88+
end,
89+
}))
90+
end
91+
return {
92+
message = localize({ type = "variable", key = "a_xmult", vars = { 3 } }),
93+
Xmult_mod = 3,
94+
}
95+
end
96+
end
97+
end
98+
}
5399
local test3 = {
54100
object_type = "Joker",
55101
name = "cry-test3",
@@ -134,4 +180,4 @@ local test4 = {
134180
end
135181
end,
136182
}
137-
return {items = {test, test3, test4}, disabled = true}
183+
return {items = {test, test2, test3, test4}, disabled = true}

localization/de.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3756,9 +3756,10 @@ return {
37563756
a_powchips_minus = {"-^#1# Chips"},
37573757
a_powmultchips_minus = {"-^#1# Mult+Chips"},
37583758
a_round_minus = {"-#1# Runde"},
3759-
3760-
a_tag = {"#1# Tag"},
3761-
a_tags = {"#1# Tags"},
3759+
a_tag_minus = {"-#1# Tag"},
3760+
a_tags_minus = {"-#1# Tags"},
3761+
a_tag = {"+#1# Tag"},
3762+
a_tags = {"+#1# Tags"},
37623763

37633764
cry_sticker_name = {"#1# Sticker"},
37643765
cry_sticker_desc = {

localization/en-us.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ return {
13031303
name = "Energia",
13041304
text = {
13051305
"When a {C:attention}Tag{} is acquired,",
1306-
"create {C:attention}#1#{} cop#y1# of it",
1306+
"create up to {C:attention}#1#{} cop#y1# of it",
13071307
"and {C:attention}increase{} the number of",
13081308
"copies by {C:attention}#2#",
13091309
},
@@ -4470,9 +4470,10 @@ return {
44704470
a_powchips_minus = {"-^#1# Chips"},
44714471
a_powmultchips_minus = {"-^#1# Mult+Chips"},
44724472
a_round_minus = {"-#1# Round"},
4473-
4474-
a_tag = {"#1# Tag"},
4475-
a_tags = {"#1# Tags"},
4473+
a_tag_minus = {"-#1# Tag"},
4474+
a_tags_minus = {"-#1# Tags"},
4475+
a_tag = {"+#1# Tag"},
4476+
a_tags = {"+#1# Tags"},
44764477

44774478
cry_sticker_name = {"#1# Sticker"},
44784479
cry_sticker_desc = {

localization/es_419.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3742,9 +3742,10 @@ return {
37423742
a_powchips_minus = {"-^#1# fichas"},
37433743
a_powmultchips_minus = {"-^#1# multi+fichas"},
37443744
a_round_minus = {"-#1# ronda"},
3745-
3746-
a_tag = {"#1# etiqueta"},
3747-
a_tags = {"#1# etiquetas"},
3745+
a_tag_minus = {"-#1# etiqueta"},
3746+
a_tags_minus = {"-#1# etiquetas"},
3747+
a_tag = {"+#1# etiqueta"},
3748+
a_tags = {"+#1# etiquetas"},
37483749

37493750
cry_sticker_name = {"Pegatina #1#"},
37503751
cry_sticker_desc = {

localization/es_ES.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3843,9 +3843,10 @@ return {
38433843
a_powchips_minus = {"-^#1# fichas"},
38443844
a_powmultchips_minus = {"-^#1# multi+fichas"},
38453845
a_round_minus = {"-#1# ronda"},
3846-
3847-
a_tag = {"#1# etiqueta"},
3848-
a_tags = {"#1# etiquetas"},
3846+
a_tag_minus = {"-#1# etiqueta"},
3847+
a_tags_minus = {"-#1# etiquetas"},
3848+
a_tag = {"+#1# etiqueta"},
3849+
a_tags = {"+#1# etiquetas"},
38493850

38503851
cry_sticker_name = {"Pegatina #1#"},
38513852
cry_sticker_desc = {

localization/fr.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3840,7 +3840,8 @@ return {
38403840
a_powchips_minus = { "-^#1# Jetons" },
38413841
a_powmultchips_minus = { "-^#1# Multi+Jetons" },
38423842
a_round_minus = { "-#1# Manche(s)" },
3843-
3843+
a_tag_minus = {"-#1# Badge"},
3844+
a_tags_minus = {"-#1# Badges"},
38443845
a_tag = { "#1# Badge" },
38453846
a_tags = { "#1# Badges" },
38463847

localization/pl.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3835,7 +3835,8 @@ return {
38353835
a_powchips_minus = {"-^#1# Chips"},
38363836
a_powmultchips_minus = {"-^#1# Mult+Chips"},
38373837
a_round_minus = {"-#1# Round"},
3838-
3838+
a_tag_minus = {"-#1# Tag"},
3839+
a_tags_minus = {"-#1# Tags"},
38393840
a_tag = {"#1# Tag"},
38403841
a_tags = {"#1# Tags"},
38413842

localization/zh_CN.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4225,6 +4225,8 @@ return {
42254225
a_round_minus = {
42264226
"-#1# 回合"
42274227
},
4228+
a_tag_minus = {"-#1# 标签"},
4229+
a_tags_minus = {"-#1# 标签"},
42284230
a_tag = {
42294231
"#1# 标签"
42304232
},

0 commit comments

Comments
 (0)