Commit c2b44070 authored by fallenstardust's avatar fallenstardust

fix LEDE-JP059/60 scripts

parent 4c0227e3
...@@ -62,7 +62,7 @@ function c101204059.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function c101204059.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function c101204059.atkcon(e,tp,eg,ep,ev,re,r,rp) function c101204059.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return Duel.GetTurnPlayer()==tp and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c101204059.atkfilter(c) function c101204059.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON)
......
...@@ -26,14 +26,14 @@ function c101204060.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,14 +26,14 @@ function c101204060.activate(e,tp,eg,ep,ev,re,r,rp)
local op=0 local op=0
if Duel.IsExistingMatchingCard(c101204060.filter,tp,LOCATION_DECK,0,1,nil) then if Duel.IsExistingMatchingCard(c101204060.filter,tp,LOCATION_DECK,0,1,nil) then
if not Duel.IsExistingMatchingCard(c101204060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and Duel.IsExistingMatchingCard(c101204060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(101204060,1)) then if not Duel.IsExistingMatchingCard(c101204060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and Duel.IsExistingMatchingCard(c101204060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(101204060,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101204060.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101204060.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
op=1
end end
op=1
end end
Duel.AdjustAll() Duel.AdjustAll()
if op==0 or Duel.IsExistingMatchingCard(c101204060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.SelectYesNo(tp,aux.Stringid(101204060,2)) then if op==0 or Duel.IsExistingMatchingCard(c101204060.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=1 and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.SelectYesNo(tp,aux.Stringid(101204060,2)) then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment