Skip to content

Commit 8bfd951

Browse files
authored
"Shouldering a Destiny" fix
Activating this card as a Continuous Spell should interact with other cards and effects as if you're activating a Continuous Spell normally (e.g. can chain "Magic Jammer" to it, cards will get Spell Counters from it, etc).
1 parent 5b17bbf commit 8bfd951

File tree

1 file changed

+58
-46
lines changed

1 file changed

+58
-46
lines changed

skill/c300308012.lua

Lines changed: 58 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,74 +2,86 @@
22
--Scripted by The Razgriz
33
local s,id=GetID()
44
function s.initial_effect(c)
5+
--Activate
56
aux.AddSkillProcedure(c,1,true,s.flipcon,s.flipop)
67
end
7-
s.listed_names={83965310}
8-
function s.thfilter(c)
9-
return c:IsCode(83965310) and c:IsAbleToHand()
10-
end
8+
s.listed_names={83965310} --"Destiny HERO - Plasma"
119
function s.flipcon(e)
1210
local tp=e:GetHandlerPlayer()
13-
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
14-
return aux.CanActivateSkill(tp) and Duel.GetFlagEffect(tp,id)==0 and ft>0
11+
return aux.CanActivateSkill(tp) and not Duel.HasFlagEffect(tp,id)
12+
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
1513
end
1614
function s.flipop(e,tp,eg,ep,ev,re,r,rp)
1715
local c=e:GetHandler()
18-
Duel.Hint(HINT_SKILL_FLIP,tp,id|1<<32)
19-
Duel.Hint(HINT_CARD,tp,id)
20-
Duel.RegisterFlagEffect(tp,id,0,0,0)
21-
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
16+
-- Duel.Hint(HINT_SKILL_FLIP,tp,id|1<<32)
17+
-- Duel.Hint(HINT_CARD,tp,id)
18+
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true)
2219
Duel.Hint(HINT_SKILL_REMOVE,tp,c:GetOriginalCode())
23-
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,nil)
24-
if #g==0 then return end
25-
if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
26-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
27-
local sg=g:Select(tp,1,1,nil)
28-
Duel.SendtoHand(sg,nil,REASON_EFFECT)
29-
Duel.ConfirmCards(1-tp,sg)
30-
end
31-
--You cannot draw cards during the Draw Phase while you control "Destiny HERO - Plasma"
20+
Duel.RegisterFlagEffect(tp,id,0,0,0)
21+
--Activate
3222
local e1=Effect.CreateEffect(c)
33-
e1:SetType(EFFECT_TYPE_FIELD)
34-
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
35-
e1:SetCode(EFFECT_CANNOT_DRAW)
36-
e1:SetRange(LOCATION_SZONE)
37-
e1:SetTargetRange(1,0)
38-
e1:SetCondition(aux.AND(s.plasmacon,s.drawcon))
23+
e1:SetDescription(aux.Stringid(id,0))
24+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
25+
e1:SetType(EFFECT_TYPE_ACTIVATE)
26+
e1:SetCode(EVENT_FREE_CHAIN)
27+
e1:SetTarget(s.target)
28+
e1:SetOperation(s.activate)
3929
c:RegisterEffect(e1)
30+
--While you control "Destiny HERO - Plasma", you cannot draw during the Draw Phase
4031
local e2=Effect.CreateEffect(c)
4132
e2:SetType(EFFECT_TYPE_FIELD)
4233
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
43-
e2:SetCode(EFFECT_DRAW_COUNT)
34+
e2:SetCode(EFFECT_CANNOT_DRAW)
4435
e2:SetRange(LOCATION_SZONE)
4536
e2:SetTargetRange(1,0)
46-
e2:SetCondition(s.plasmacon)
47-
e2:SetValue(0)
37+
e2:SetCondition(aux.AND(s.plasmacon,s.drawcon))
4838
c:RegisterEffect(e2)
49-
--"Destiny HERO - Plasma" you control gains 100 ATK for each monster in both GYs
50-
local e3=Effect.CreateEffect(c)
51-
e3:SetType(EFFECT_TYPE_FIELD)
52-
e3:SetCode(EFFECT_UPDATE_ATTACK)
53-
e3:SetRange(LOCATION_SZONE)
54-
e3:SetTargetRange(LOCATION_MZONE,0)
39+
local e3=e2:Clone()
40+
e3:SetCode(EFFECT_DRAW_COUNT)
5541
e3:SetCondition(s.plasmacon)
56-
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,83965310))
57-
e3:SetValue(function(e,c) return Duel.GetMatchingGroupCount(Card.IsMonster,0,LOCATION_GRAVE,LOCATION_GRAVE,nil)*100 end)
42+
e3:SetValue(0)
5843
c:RegisterEffect(e3)
59-
--"Destiny HERO - Plasma" you control cannot be destroyed by opponent's card effects
60-
local e4=e3:Clone()
61-
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
62-
e4:SetValue(aux.indoval)
44+
--Each "Destiny HERO - Plasma" you control gains 100 ATK for each monster in the GYs, cannot be destroyed by your opponent's card effects, also can make a second attack during each Battle Phase
45+
local e4=Effect.CreateEffect(c)
46+
e4:SetType(EFFECT_TYPE_FIELD)
47+
e4:SetCode(EFFECT_UPDATE_ATTACK)
48+
e4:SetRange(LOCATION_SZONE)
49+
e4:SetTargetRange(LOCATION_MZONE,0)
50+
e4:SetCondition(s.plasmacon)
51+
e4:SetTarget(aux.TargetBoolFunction(Card.IsCode,83965310))
52+
e4:SetValue(function(e,c) return Duel.GetMatchingGroupCount(Card.IsMonster,0,LOCATION_GRAVE,LOCATION_GRAVE,nil)*100 end)
6353
c:RegisterEffect(e4)
64-
--"Destiny HERO - Plasma" you control can make a second attack each Battle Phase
65-
local e5=e3:Clone()
66-
e5:SetCode(EFFECT_EXTRA_ATTACK)
67-
e5:SetValue(1)
54+
local e5=e4:Clone()
55+
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
56+
e5:SetTargetRange(LOCATION_ONFIELD,0)
57+
e5:SetValue(aux.indoval)
6858
c:RegisterEffect(e5)
59+
local e6=e4:Clone()
60+
e6:SetCode(EFFECT_EXTRA_ATTACK)
61+
e6:SetValue(1)
62+
c:RegisterEffect(e6)
63+
--Activate this Skill as a Continuous Spell
64+
Duel.Activate(e1)
65+
end
66+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
67+
if chk==0 then return true end
68+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE)
69+
end
70+
function s.thfilter(c)
71+
return c:IsCode(83965310) and c:IsAbleToHand()
72+
end
73+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
74+
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil)
75+
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
76+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
77+
local sg=g:Select(tp,1,1,nil)
78+
Duel.SendtoHand(sg,nil,REASON_EFFECT)
79+
Duel.ConfirmCards(1-tp,sg)
80+
end
6981
end
7082
function s.plasmacon(e)
7183
return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,83965310),e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
7284
end
73-
function s.drawcon(e)
74-
return Duel.GetCurrentPhase()==PHASE_DRAW
85+
function s.drawcon()
86+
return Duel.IsPhase(PHASE_DRAW)
7587
end

0 commit comments

Comments
 (0)