Commit 27153b8c authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/AC04' into master

parents f4003fac c8dced56
...@@ -105,4 +105,4 @@ end ...@@ -105,4 +105,4 @@ end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -51,9 +51,9 @@ function s.costfilter(c,code) ...@@ -51,9 +51,9 @@ function s.costfilter(c,code)
return c:GetFlagEffect(code)~=0 return c:GetFlagEffect(code)~=0
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local qg=e:GetHandler():GetEquipGroup() local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and qg:IsExists(s.costfilter,1,nil,e:GetHandler():GetCode()) end if chk==0 then return c:IsAbleToGraveAsCost() and aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(c,REASON_COST)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(1500) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -104,4 +104,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,4 +104,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
...@@ -107,4 +107,4 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -107,4 +107,4 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
end end
\ No newline at end of file
...@@ -46,4 +46,4 @@ end ...@@ -46,4 +46,4 @@ end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.desfilter,nil,e,tp):Filter(Card.IsRelateToChain,nil) local g=eg:Filter(s.desfilter,nil,e,tp):Filter(Card.IsRelateToChain,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -48,4 +48,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,4 +48,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
...@@ -70,4 +70,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,4 +70,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -53,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -103,4 +103,4 @@ end ...@@ -103,4 +103,4 @@ end
function s.poscon(e,tp,eg,ep,ev,re,r,rp) function s.poscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
\ No newline at end of file
...@@ -120,4 +120,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -120,4 +120,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
end end
end end
\ No newline at end of file
...@@ -55,4 +55,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,4 +55,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end end
\ No newline at end of file
...@@ -87,4 +87,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
\ No newline at end of file
...@@ -56,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
...@@ -73,4 +73,4 @@ function s.cfilter(c) ...@@ -73,4 +73,4 @@ function s.cfilter(c)
end end
function s.ieecon(e,tp,eg,ep,ev,re,r,rp) function s.ieecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
\ No newline at end of file
...@@ -59,4 +59,4 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,4 +59,4 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -65,4 +65,4 @@ function s.val(e,re,ev,r,rp,rc) ...@@ -65,4 +65,4 @@ function s.val(e,re,ev,r,rp,rc)
return true return true
end end
return false return false
end end
\ No newline at end of file
...@@ -166,4 +166,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -166,4 +166,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(tc,EVENT_DETACH_MATERIAL,e,0,0,0,0) Duel.RaiseSingleEvent(tc,EVENT_DETACH_MATERIAL,e,0,0,0,0)
Duel.RaiseEvent(tc,EVENT_DETACH_MATERIAL,e,0,0,0,0) Duel.RaiseEvent(tc,EVENT_DETACH_MATERIAL,e,0,0,0,0)
end end
end end
\ No newline at end of file
...@@ -16,6 +16,7 @@ function s.initial_effect(c) ...@@ -16,6 +16,7 @@ function s.initial_effect(c)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.atktg)
e2:SetValue(s.val) e2:SetValue(s.val)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
...@@ -46,11 +47,16 @@ function s.atkfilter(c,code) ...@@ -46,11 +47,16 @@ function s.atkfilter(c,code)
return c:IsFaceup() and bit.band(c:GetOriginalType(),TYPE_MONSTER)==TYPE_MONSTER return c:IsFaceup() and bit.band(c:GetOriginalType(),TYPE_MONSTER)==TYPE_MONSTER
and c:GetFlagEffect(code)~=0 and c:GetFlagEffect(code)~=0
end end
function s.atktg(e,c)
return c:IsSetCard(0x3)
end
function s.val(e,c) function s.val(e,c)
local g=c:GetEquipGroup():Filter(s.atkfilter,nil,c:GetCode()) local g=c:GetEquipGroup():Filter(s.atkfilter,nil,FLAG_ID_ALLURE_QUEEN)
if g:GetCount()>0 then if g:GetCount()>0 then
return g:GetSum(Card.GetBaseAttack) return g:GetSum(Card.GetBaseAttack)
else return 0 end else
return 0
end
end end
function s.spcfilter(c,tp) function s.spcfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
...@@ -78,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,ft,ft) local sg=g:SelectSubGroup(tp,aux.dncheck,false,ft,ft)
if sg then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end if sg then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end
end end
\ No newline at end of file
...@@ -77,4 +77,4 @@ function s.cthop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,4 +77,4 @@ function s.cthop(e,tp,eg,ep,ev,re,r,rp)
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
\ No newline at end of file
...@@ -125,4 +125,4 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -125,4 +125,4 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp)
qc:RegisterEffect(e1) qc:RegisterEffect(e1)
end end
end end
end end
\ No newline at end of file
...@@ -108,4 +108,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,4 +108,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -113,4 +113,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,4 +113,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -73,4 +73,4 @@ function s.limval(e,re,rp) ...@@ -73,4 +73,4 @@ function s.limval(e,re,rp)
return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER)
and rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsSummonType(SUMMON_TYPE_SPECIAL)
and rc:GetAttack()<e:GetHandler():GetAttack() and rc:GetAttack()<e:GetHandler():GetAttack()
end end
\ No newline at end of file
...@@ -156,4 +156,4 @@ function s.lvop3(e,tp,eg,ep,ev,re,r,rp) ...@@ -156,4 +156,4 @@ function s.lvop3(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -73,4 +73,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,4 +73,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.IsPlayerCanDiscardDeck(1-tp,1) then if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.IsPlayerCanDiscardDeck(1-tp,1) then
Duel.DiscardDeck(1-tp,3,REASON_EFFECT) Duel.DiscardDeck(1-tp,3,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -57,4 +57,4 @@ end ...@@ -57,4 +57,4 @@ end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*300,REASON_EFFECT) Duel.Damage(p,Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*300,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -185,4 +185,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -185,4 +185,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -95,4 +95,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,4 +95,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -82,4 +82,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,4 +82,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -90,4 +90,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,4 +90,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1) e1:SetValue(1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
\ No newline at end of file
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