-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cosmic Collapse and Power Grid fixes (#12)
* Added jucing to tenpin * Fix for Cosmic Collapse * Fixed Power Grid with latest SMOD * New Power Grid fix * Reverted tenpin
- Loading branch information
1 parent
74a4650
commit 9c85cd2
Showing
5 changed files
with
109 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,71 @@ | ||
SMODS.Joker { | ||
key = "tenpin", | ||
name = "Ten-Pin", | ||
atlas = 'kcvanillajokeratlas', | ||
pos = { | ||
x = 0, | ||
y = kcv_getJokerAtlasIndex('tenpin') | ||
}, | ||
rarity = 1, | ||
cost = 6, | ||
unlocked = true, | ||
discovered = true, | ||
eternal_compat = true, | ||
perishable_compat = true, | ||
blueprint_compat = true, | ||
config = { | ||
x_mult = 1, | ||
hands_remaining = 0 | ||
}, | ||
loc_vars = function(self, info_queue, card) | ||
local remaining_txt | ||
if card.ability.hands_remaining > 0 then | ||
remaining_txt = localize { | ||
type = 'variable', | ||
key = 'kcv_active_for_X_more_hands', | ||
vars = {card.ability.hands_remaining} | ||
} | ||
else | ||
remaining_txt = localize('kcv_inactive') | ||
end | ||
return { | ||
vars = {remaining_txt} | ||
} | ||
end, | ||
calculate = function(self, card, context) | ||
if context.after and context.scoring_hand and not context.blueprint then | ||
local has_10 | ||
for i, other_card in ipairs(context.scoring_hand) do | ||
if other_card:get_id() == 10 and not other_card.debuff then | ||
has_10 = true | ||
break | ||
end | ||
end | ||
if has_10 then | ||
card.ability.hands_remaining = 2 | ||
card.ability.x_mult = 2 | ||
card_eval_status_text(card, 'extra', nil, nil, nil, { | ||
message = localize('k_active_ex') | ||
}); | ||
else | ||
card.ability.hands_remaining = card.ability.hands_remaining - 1 | ||
if card.ability.hands_remaining > 0 then | ||
card_eval_status_text(card, 'extra', nil, nil, nil, { | ||
message = card.ability.hands_remaining .. ' remaining' | ||
}); | ||
elseif card.ability.x_mult == 2 then | ||
card.ability.x_mult = 1 | ||
card_eval_status_text(card, 'extra', nil, nil, nil, { | ||
message = localize('k_reset') | ||
}); | ||
|
||
end | ||
end | ||
end | ||
end | ||
} | ||
SMODS.Joker { | ||
key = "tenpin", | ||
name = "Ten-Pin", | ||
atlas = 'kcvanillajokeratlas', | ||
pos = { | ||
x = 0, | ||
y = kcv_getJokerAtlasIndex('tenpin') | ||
}, | ||
rarity = 1, | ||
cost = 6, | ||
unlocked = true, | ||
discovered = true, | ||
eternal_compat = true, | ||
perishable_compat = true, | ||
blueprint_compat = true, | ||
config = { | ||
x_mult = 1, | ||
hands_remaining = 0 | ||
}, | ||
loc_vars = function(self, info_queue, card) | ||
local remaining_txt | ||
if card.ability.hands_remaining > 0 then | ||
remaining_txt = localize { | ||
type = 'variable', | ||
key = 'kcv_active_for_X_more_hands', | ||
vars = {card.ability.hands_remaining} | ||
} | ||
else | ||
remaining_txt = localize('kcv_inactive') | ||
end | ||
return { | ||
vars = {remaining_txt} | ||
} | ||
end, | ||
calculate = function(self, card, context) | ||
if context.after and context.scoring_hand and not context.blueprint then | ||
local has_10 | ||
for i, other_card in ipairs(context.scoring_hand) do | ||
if other_card:get_id() == 10 and not other_card.debuff then | ||
has_10 = true | ||
break | ||
end | ||
end | ||
if has_10 then | ||
card.ability.hands_remaining = 2 | ||
card.ability.x_mult = 2 | ||
card_eval_status_text(card, 'extra', nil, nil, nil, { | ||
message = localize('k_active_ex') | ||
}); | ||
else | ||
card.ability.hands_remaining = card.ability.hands_remaining - 1 | ||
if card.ability.hands_remaining > 0 then | ||
card_eval_status_text(card, 'extra', nil, nil, nil, { | ||
message = card.ability.hands_remaining .. ' remaining' | ||
}); | ||
elseif card.ability.x_mult == 2 then | ||
card_eval_status_text(card, 'extra', nil, nil, nil, { | ||
message = localize('k_reset') | ||
}); | ||
G.E_MANAGER:add_event(Event({ | ||
trigger = 'immediate', | ||
func = function() | ||
card.ability.x_mult = 1 | ||
return true | ||
end | ||
})) | ||
end | ||
end | ||
end | ||
end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters