Commit 1ed37c9d authored by mercury233's avatar mercury233

fix

parent 01b8db47
......@@ -35,13 +35,13 @@ end
function c100408026.spfilter1(c,e,tp)
local lv=c:GetLevel()
return (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousSetCard(0x9e) and c:IsType(TYPE_MONSTER)
and c:IsPreviousSetCard(0x214) and c:IsType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsCanBeEffectTarget(e)
and lv>0 and Duel.IsExistingMatchingCard(c100408026.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,lv)
end
function c100408026.spfilter2(c,e,tp,lv)
return c:GetLevel()<lv and c:IsSetCard(0x9e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:GetLevel()<lv and c:IsSetCard(0x214) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100408026.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c100408026.spfilter1(chkc,e,tp) end
......
......@@ -71,7 +71,7 @@ function c101004017.spop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_ATTACK_FINAL)
e3:SetCode(EFFECT_SET_ATTACK)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
......
......@@ -8,7 +8,7 @@ function c101004043.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101004043,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101004043)
......@@ -48,8 +48,10 @@ function c101004043.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c101004043.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if e:GetHandler():GetMutualLinkedGroupCount()>0 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e:SetLabel(1)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetLabel(0)
end
end
......
......@@ -8,7 +8,6 @@ function c101004044.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101004044,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -41,8 +40,10 @@ end
function c101004044.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) end
if e:GetHandler():GetMutualLinkedGroupCount()>0 then
e:SetCategory(CATEGORY_DRAW)
e:SetLabel(1)
else
e:SetCategory(0)
e:SetLabel(0)
end
end
......
......@@ -8,7 +8,7 @@ function c101004045.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101004045,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -48,8 +48,10 @@ function c101004045.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c101004045.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if e:GetHandler():GetMutualLinkedGroupCount()>0 then
e:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e:SetLabel(1)
else
e:SetCategory(CATEGORY_DESTROY)
e:SetLabel(0)
end
end
......
......@@ -8,7 +8,7 @@ function c101004046.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101004046,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -45,8 +45,10 @@ function c101004046.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if e:GetHandler():GetMutualLinkedGroupCount()>0 then
e:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e:SetLabel(1)
else
e:SetCategory(CATEGORY_DESTROY)
e:SetLabel(0)
end
end
......
......@@ -8,7 +8,7 @@ function c101004047.initial_effect(c)
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101004047,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -45,8 +45,10 @@ function c101004047.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
if e:GetHandler():GetMutualLinkedGroupCount()>0 then
e:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e:SetLabel(1)
else
e:SetCategory(CATEGORY_TODECK)
e:SetLabel(0)
end
end
......
......@@ -8,7 +8,7 @@ function c101004048.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101004048,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetCategory(CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -49,8 +49,10 @@ function c101004048.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c101004048.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
if e:GetHandler():GetMutualLinkedGroupCount()>0 then
e:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_DRAW)
e:SetLabel(1)
else
e:SetCategory(CATEGORY_LEAVE_GRAVE)
e:SetLabel(0)
end
end
......
......@@ -31,7 +31,7 @@ function c101004053.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroVallerFilter(c101004053.rmfilter),tp,LOCATION_GRAVE,0,1,1,nil,tc:GetLink())
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101004053.rmfilter),tp,LOCATION_GRAVE,0,1,1,nil,tc:GetLink())
local rc=g:GetFirst()
if rc and Duel.Remove(rc,0,REASON_EFFECT)~=0 and rc:IsLocation(LOCATION_REMOVED)
and Duel.Destroy(tc,REASON_EFFECT)~=0 then
......
......@@ -27,9 +27,9 @@ function c101004070.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(c101004070.etarget)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
......@@ -37,6 +37,7 @@ function c101004070.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(c101004070.etarget)
e2:SetValue(1)
......@@ -45,5 +46,5 @@ function c101004070.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete()
end
function c101004070.etarget(e,c)
return c:IsSetCard(0x103) and c:IsType(TYPE_TRAP) and not c==e:GetHandler()
return c:IsSetCard(0x103) and c:IsType(TYPE_TRAP) and c~=e:GetHandler()
end
......@@ -49,34 +49,39 @@ function c101004077.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
if not c:IsStatus(STATUS_ACT_FROM_HAND) then
if not c:IsStatus(STATUS_ACT_FROM_HAND) and c:IsLocation(LOCATION_SZONE) then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e4:SetTarget(c101004077.distg)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetLabel(c:GetColumnZone(LOCATION_SZONE))
e4:SetLabel(c:GetSequence())
Duel.RegisterEffect(e4,tp)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetOperation(c101004077.disop)
e5:SetReset(RESET_PHASE+PHASE_END)
e5:SetLabel(c:GetColumnZone(LOCATION_SZONE))
e5:SetLabel(c:GetSequence())
Duel.RegisterEffect(e5,tp)
end
end
end
function c101004077.distg(e,c)
local zone=e:GetLabel()
return c:IsType(TYPE_SPELL+TYPE_TRAP) and bit.extract(zone,c:GetSequence())~=0
local seq=e:GetLabel()
local p=c:GetControler()
local tp=e:GetHandlerPlayer()
return c:IsType(TYPE_SPELL+TYPE_TRAP)
and ((p==tp and c:GetSequence()==seq) or (p==1-tp and c:GetSequence()==4-seq))
end
function c101004077.disop(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetLabel()
local tseq=e:GetLabel()
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local tpe=re:GetActiveType()
if bit.band(loc,LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and bit.extract(zone,seq)~=0 then
local p=re:GetHandlerPlayer()
local tp=e:GetHandlerPlayer()
if bit.band(loc,LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and ((p==tp and seq==tseq) or (p==1-tp and seq==4-tseq)) then
Duel.NegateEffect(ev)
end
end
......
......@@ -51,7 +51,7 @@ end
function c101004100.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP) then
if Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
......
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