Commit 3334dc3c authored by mercury233's avatar mercury233

fix

parent c1a33136
......@@ -57,7 +57,7 @@ end
function c100313001.filter2(c,e,tp,ft,ft2)
return c:IsSetCard(0x6) and c:IsLevelBelow(4)
and ((ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP))
or (ft2>0 and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP)))
or (ft2>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)))
end
function c100313001.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetMZoneCount(tp)
......@@ -74,7 +74,7 @@ function c100313001.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
local tc=tg:GetFirst()
local o1=ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
local o2=ft2>0 and tc:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP)
local o2=ft2>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
local opt=0
if o1 and o2 then
opt=Duel.SelectOption(tp,aux.Stringid(100313001,3),aux.Stringid(100313001,4))
......@@ -83,8 +83,9 @@ function c100313001.operation(e,tp,eg,ep,ev,re,r,rp)
else
opt=1
end
if opt==1 then tp=1-tp end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local p=tp
if opt==1 then p=1-tp end
Duel.SpecialSummon(tc,0,tp,p,false,false,POS_FACEUP)
end
end
end
......@@ -71,7 +71,7 @@ function c101110004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c101110004.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,101110104,0,TYPES_TOKEN_MONSTER,700,700,2,RACE_WINDBEAST,ATTRIBUTE_DARK) then
if Duel.IsPlayerCanSpecialSummonMonster(tp,101110104,0,TYPES_TOKEN_MONSTER+TYPE_TUNER,700,700,2,RACE_WINDBEAST,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,101110104)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
......
......@@ -14,7 +14,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
......
......@@ -20,6 +20,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.condition)
e2:SetTarget(s.target)
......
......@@ -17,7 +17,7 @@ function s.initial_effect(c)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_POSITION+CATEGORY_NEGATE)
e2:SetCategory(CATEGORY_POSITION+CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
......@@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -76,7 +76,7 @@ end
function c101110021.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101110021.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c101110021.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -78,12 +78,9 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil,rc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,rc)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
if sg:GetCount()>0 then
Duel.SSet(tp,sg:GetFirst())
end
Duel.SSet(tp,g:GetFirst())
end
end
......@@ -68,6 +68,7 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
......
......@@ -53,7 +53,7 @@ function s.confilter(c)
end
function s.tohcon1(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return #g>0 and g:FilterCount(s.confilter,nil)>0
return g:FilterCount(s.confilter,nil)>0
end
function s.tohcon2(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
......@@ -85,15 +85,15 @@ function s.tohop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsFaceup()
and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_HAND) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0)
e2:SetValue(s.aclimit)
e2:SetLabel(tc:GetCode())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function s.aclimit(e,re,tp)
......
......@@ -26,7 +26,7 @@ function s.initial_effect(c)
e3:SetOperation(s.guessop)
c:RegisterEffect(e3)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
......
......@@ -41,7 +41,7 @@ function s.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -58,7 +58,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(s.toefilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.toefilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
......
......@@ -84,7 +84,7 @@ end
function c101110045.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
if Duel.SelectEffectYesNo(tp,c,96) then
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
else return false end
......
......@@ -21,6 +21,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.mttg)
......
......@@ -23,7 +23,7 @@ function c101110050.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_BATTLE_START+TIMING_ATTACK+TIMING_BATTLE_END)
e2:SetHintTiming(TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1,101110050+100)
e2:SetCondition(c101110050.descon)
e2:SetTarget(c101110050.destg)
......
......@@ -9,6 +9,7 @@ function c101110067.initial_effect(c)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101110067,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
......@@ -19,6 +20,7 @@ function c101110067.initial_effect(c)
c:RegisterEffect(e2)
--token if monster destroyed
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101110067,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
......
......@@ -8,7 +8,6 @@ function c101110072.initial_effect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCountLimit(1,101110072)
e1:SetCondition(c101110072.discon)
e1:SetCost(c101110072.discost)
......
......@@ -86,7 +86,7 @@ function c101110075.caop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetTargetRange(1,1)
e1:SetValue(c101110075.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
......
......@@ -24,7 +24,7 @@ function c101110076.initial_effect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101110076+100)
e3:SetCondition(c101110076.rmcon)
......@@ -68,6 +68,8 @@ function c101110076.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil,tp,POS_FACEDOWN)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
if #sg>0 then
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
Duel.ShuffleHand(1-tp)
end
\ No newline at end of file
......@@ -66,13 +66,8 @@ function s.rscost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function s.rstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function s.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
......
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