Commit 316da72c authored by fallenstardust's avatar fallenstardust

同步脚本修复

parent 2210858f
...@@ -63,22 +63,31 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,22 +63,31 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.lvfilter(c) function s.lvfilter(c)
return c:IsFaceup() and c:IsLevelAbove(0) and c:IsSetCard(0xba) return c:IsFaceup() and c:IsLevelAbove(1) and c:IsSetCard(0xba)
end end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
end end
function s.lvop(e,tp,eg,ep,ev,re,r,rp) function s.lvop(e,tp,eg,ep,ev,re,r,rp)
--local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local sel=0
while tc do local lv=1
if not g:IsExists(Card.IsLevelAbove,1,nil,2) then
sel=Duel.SelectOption(tp,aux.Stringid(id,0))
else
sel=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1))
end
if sel==1 then
lv=-1
end
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
tc=g:GetNext()
end end
end end
\ No newline at end of file
...@@ -61,13 +61,13 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,13 +61,13 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.filter(c) function s.filter(c)
return c:IsSetCard(0xba) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() return c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) and not c:IsForbidden()
end end
function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST)
end end
function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk) function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
...@@ -13,6 +13,7 @@ function s.initial_effect(c) ...@@ -13,6 +13,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
...@@ -24,7 +25,7 @@ function s.initial_effect(c) ...@@ -24,7 +25,7 @@ function s.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1,id+o)
e3:SetTarget(s.drtg) e3:SetTarget(s.drtg)
e3:SetOperation(s.drop) e3:SetOperation(s.drop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -69,4 +70,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,4 +70,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -15,12 +15,12 @@ function c101203079.initial_effect(c) ...@@ -15,12 +15,12 @@ function c101203079.initial_effect(c)
--to hand --to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK) e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(aux.exccon) e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(s.tdtg) e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop) e2:SetOperation(s.tdop)
...@@ -40,21 +40,21 @@ end ...@@ -40,21 +40,21 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)~=0 then if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg) Duel.HintSelection(sg)
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
local rg=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_REMOVED,nil,TYPE_MONSTER) local rg=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_REMOVED,nil,TYPE_MONSTER)
if rg:GetCount()>0 then if rg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local fg=rg:Select(tp,1,1,nil) local fg=rg:Select(tp,1,1,nil)
Duel.HintSelection(fg) Duel.HintSelection(fg)
Duel.SendtoGrave(fg,REASON_EFFECT+REASON_RETURN) Duel.SendtoGrave(fg,REASON_EFFECT+REASON_RETURN)
end end
end end
end end
end end
end end
--todeck --todeck
...@@ -76,9 +76,9 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,9 +76,9 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
if rc:IsRelateToEffect(e) and Duel.SendtoDeck(rc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 then if rc:IsRelateToEffect(e) and Duel.SendtoDeck(rc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(s.stfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.stfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1))then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg) Duel.SSet(tp,sg)
end end
end end
end end
\ No newline at end of file
No preview for this file type
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