Commit 434a9dc7 authored by mercury233's avatar mercury233

fix

parent 88e3a006
#The first line is used for comment #The first line is used for comment
!setname 0x216 魔神仪 !setname 0x216 魔神仪
!setname 0x217 圣像骑士 !setname 0x217 圣像骑士
!counter 0x48 指示物(连接死亡炮塔)
...@@ -84,8 +84,8 @@ function c100200147.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,8 +84,8 @@ function c100200147.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and c:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) and c:IsFaceup()
and Duel.SelectYesNo(tp,aux.Stringid(100200147,3)) then and Duel.SelectEffectYesNo(tp,c,aux.Stringid(100200147,3)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
end end
end end
......
...@@ -70,7 +70,7 @@ end ...@@ -70,7 +70,7 @@ end
function c100203028.eqop(e,tp,eg,ep,ev,re,r,rp) function c100203028.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
c100203028.equip_monster(c,tp,tc) c100203028.equip_monster(c,tp,tc)
else Duel.SendtoGrave(tc,REASON_EFFECT) end else Duel.SendtoGrave(tc,REASON_EFFECT) end
......
...@@ -39,12 +39,14 @@ function c101005007.repfilter(c,tp) ...@@ -39,12 +39,14 @@ function c101005007.repfilter(c,tp)
end end
function c101005007.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101005007.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return eg:IsExists(c101005007.repfilter,1,c,tp) and c:IsAbleToRemove() end if chk==0 then return eg:IsExists(c101005007.repfilter,1,c,tp) and c:IsAbleToRemove()
and Duel.GetFlagEffect(tp,101005007)==0 end
return Duel.SelectEffectYesNo(tp,c,96) return Duel.SelectEffectYesNo(tp,c,96)
end end
function c101005007.repval(e,c) function c101005007.repval(e,c)
return c101005007.repfilter(c,e:GetHandlerPlayer()) return c101005007.repfilter(c,e:GetHandlerPlayer())
end end
function c101005007.repop(e,tp,eg,ep,ev,re,r,rp) function c101005007.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,101005007,RESET_PHASE+PHASE_END,0,1)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end end
...@@ -25,7 +25,8 @@ function c101005020.initial_effect(c) ...@@ -25,7 +25,8 @@ function c101005020.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101005020.sprfilter(c,tp) function c101005020.sprfilter(c,tp)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsType(TYPE_EFFECT) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsType(TYPE_EFFECT) and c:IsType(TYPE_MONSTER)
and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end end
function c101005020.sprcon(e,c) function c101005020.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
...@@ -53,7 +54,7 @@ function c101005020.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,7 +54,7 @@ function c101005020.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c101005020.spfilter(c,e,tp) function c101005020.spfilter(c,e,tp)
return c:IsType(SUMMON_TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101005020.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101005020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101005020.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c101005020.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
......
...@@ -20,7 +20,7 @@ function c101005021.initial_effect(c) ...@@ -20,7 +20,7 @@ function c101005021.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101005021.cfilter(c,tp) function c101005021.cfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) return bit.band(c:GetPreviousTypeOnField(),TYPE_SPELL+TYPE_TRAP)~=0 and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp
end end
function c101005021.spcon(e,tp,eg,ep,ev,re,r,rp) function c101005021.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -54,8 +54,10 @@ end ...@@ -54,8 +54,10 @@ end
function c101005034.posop(e,tp,eg,ep,ev,re,r,rp) function c101005034.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsAttackPos() and tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0 if tc:IsAttackPos() and tc:IsRelateToEffect(e) then
and c:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
...@@ -50,7 +50,7 @@ function c101005048.atttg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,7 +50,7 @@ function c101005048.atttg(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup() local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.IsExistingMatchingCard(c101005048.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,lg) end if chk==0 then return Duel.IsExistingMatchingCard(c101005048.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceRace(tp,1,0xffff) local att=Duel.AnnounceAttribute(tp,1,0xffff)
e:SetLabel(att) e:SetLabel(att)
end end
function c101005048.attop(e,tp,eg,ep,ev,re,r,rp) function c101005048.attop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -17,9 +17,9 @@ function c101005055.filter(c) ...@@ -17,9 +17,9 @@ function c101005055.filter(c)
end end
function c101005055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101005055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005055.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005055.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101005055.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c101005055.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101005055.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c101005055.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c101005055.activate(e,tp,eg,ep,ev,re,r,rp) function c101005055.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -48,7 +48,9 @@ function c101005067.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,9 @@ function c101005067.thop(e,tp,eg,ep,ev,re,r,rp)
c:SetTurnCounter(ct) c:SetTurnCounter(ct)
if ct==3 then if ct==3 then
local g=e:GetLabelObject() local g=e:GetLabelObject()
if g:GetCount()==3 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
end
end end
...@@ -48,7 +48,7 @@ function c101005070.counterfilter(c) ...@@ -48,7 +48,7 @@ function c101005070.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or (c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_DARK)) return c:GetSummonLocation()~=LOCATION_EXTRA or (c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_DARK))
end end
function c101005070.ctcon(e,tp,eg,ep,ev,re,r,rp) function c101005070.ctcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE) return ep==tp and bit.band(r,REASON_BATTLE)==REASON_BATTLE
end end
function c101005070.ctop(e,tp,eg,ep,ev,re,r,rp) function c101005070.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x48,1) e:GetHandler():AddCounter(0x48,1)
......
...@@ -49,8 +49,8 @@ function c101005075.ceoperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,8 +49,8 @@ function c101005075.ceoperation(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,c101005075.repop) Duel.ChangeChainOperation(ev,c101005075.repop)
end end
function c101005075.spfilter1(c,e,tp) function c101005075.spfilter1(c,e,tp)
local zone=bit.band(c:GetLinkedZone(),0x1f) local zone=bit.band(c:GetLinkedZone(tp),0x1f)
return c:IsFaceup() and c:IsType(TYPE_LINK) and Duel.IsExistingMatchingCard(c101005075.spfilter2,tp,0x13,0,1,c,e,tp,zone) return c:IsFaceup() and c:IsType(TYPE_LINK) and zone>0 and Duel.IsExistingMatchingCard(c101005075.spfilter2,tp,0x13,0,1,c,e,tp,zone)
end end
function c101005075.spfilter2(c,e,tp,zone) function c101005075.spfilter2(c,e,tp,zone)
return c:IsSetCard(0x104) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,tp,zone) return c:IsSetCard(0x104) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,tp,zone)
...@@ -58,6 +58,7 @@ end ...@@ -58,6 +58,7 @@ end
function c101005075.sptarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101005075.sptarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c101005075.spfilter1(chkc,e,tp) and chkc:IsLocation(LOCATION_MZONE) end if chkc then return c101005075.spfilter1(chkc,e,tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c101005075.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c101005075.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101005075.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) Duel.SelectTarget(tp,c101005075.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13)
end end
...@@ -65,7 +66,8 @@ function c101005075.spoperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +66,8 @@ function c101005075.spoperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
local zone=bit.band(tc:GetLinkedZone(),0x1f) local zone=bit.band(tc:GetLinkedZone(tp),0x1f)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101005075.spfilter2),tp,0x13,0,1,1,c,e,tp,zone) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101005075.spfilter2),tp,0x13,0,1,1,c,e,tp,zone)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE,zone) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE,zone)
......
...@@ -57,8 +57,8 @@ function c101005101.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,8 +57,8 @@ function c101005101.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101005101.sdcon(e) function c101005101.sdcon(e)
local g=e:GetHandler():GetEquipGroup() local tc=e:GetHandler():GetEquipTarget()
return g and g:GetCount()>0 and Duel.IsExistingMatchingCard(nil,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,g) return tc and Duel.IsExistingMatchingCard(nil,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,tc)
end end
function c101005101.adcon(e) function c101005101.adcon(e)
if Duel.GetCurrentPhase()~=PHASE_DAMAGE_CAL then return false end if Duel.GetCurrentPhase()~=PHASE_DAMAGE_CAL then return false end
......
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