Commit 97d84f45 authored by salix5's avatar salix5

Merge branch 'patch5' into patch6

parents d1574eae daa46303
...@@ -15,7 +15,7 @@ function c42671151.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c42671151.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c42671151.target(e,tp,eg,ep,ev,re,r,rp,chk) function c42671151.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,42671152,0,0x4011,ev,ev,1,RACE_FIEND,ATTRIBUTE_DARK) end and Duel.IsPlayerCanSpecialSummonMonster(tp,42671152,0,0x4011,-2,-2,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
...@@ -23,7 +23,7 @@ end ...@@ -23,7 +23,7 @@ end
function c42671151.activate(e,tp,eg,ep,ev,re,r,rp) function c42671151.activate(e,tp,eg,ep,ev,re,r,rp)
local rec=Duel.Recover(tp,ev,REASON_EFFECT) local rec=Duel.Recover(tp,ev,REASON_EFFECT)
if rec~=ev or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if rec~=ev or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,42671152,0,0x4011,ev,ev,1,RACE_FIEND,ATTRIBUTE_DARK) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,42671152,0,0x4011,-2,-2,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,42671152) local token=Duel.CreateToken(tp,42671152)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -68,9 +68,8 @@ function c44330098.sumop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,9 +68,8 @@ function c44330098.sumop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local val=e:GetLabelObject():GetLabel() local val=e:GetLabelObject():GetLabel()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,44330099,0,0x4011,0,0,7,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,44330099,0,0x4011,-2,-2,7,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,44330099) local token=Duel.CreateToken(tp,44330099)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
...@@ -81,6 +80,7 @@ function c44330098.sumop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,6 +80,7 @@ function c44330098.sumop2(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_SET_DEFENCE) e2:SetCode(EFFECT_SET_DEFENCE)
e2:SetValue(val) e2:SetValue(val)
token:RegisterEffect(e2) token:RegisterEffect(e2)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end end
function c44330098.sumcon3(e,tp,eg,ep,ev,re,r,rp) function c44330098.sumcon3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
...@@ -13,7 +13,7 @@ function c67949763.initial_effect(c) ...@@ -13,7 +13,7 @@ function c67949763.initial_effect(c)
end end
function c67949763.filter(c,tp) function c67949763.filter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,c:GetAttack(),0,1,RACE_FIEND,ATTRIBUTE_DARK) and Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,-2,0,1,RACE_FIEND,ATTRIBUTE_DARK)
end end
function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67949763.filter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67949763.filter(chkc,tp) end
...@@ -34,7 +34,7 @@ function c67949763.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function c67949763.activate(e,tp,eg,ep,ev,re,r,rp)
atk=tc:GetAttack() atk=tc:GetAttack()
cr=true cr=true
end end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,atk,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,-2,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
if cr then if cr then
local de=Effect.CreateEffect(e:GetHandler()) local de=Effect.CreateEffect(e:GetHandler())
de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
...@@ -6,18 +6,17 @@ function c74841885.initial_effect(c) ...@@ -6,18 +6,17 @@ function c74841885.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--summon success --tribute check
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetCondition(c74841885.condition) e2:SetValue(c74841885.valcheck)
e2:SetOperation(c74841885.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tribute check --give negate effect only when summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK) e3:SetCode(EFFECT_SUMMON_COST)
e3:SetValue(c74841885.valcheck) e3:SetOperation(c74841885.facechk)
e3:SetLabelObject(e2) e3:SetLabelObject(e2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
...@@ -33,18 +32,12 @@ function c74841885.valcheck(e,c) ...@@ -33,18 +32,12 @@ function c74841885.valcheck(e,c)
if g:IsExists(c74841885.chkfilter,1,nil,RACE_FIEND,ATTRIBUTE_DARK) then if g:IsExists(c74841885.chkfilter,1,nil,RACE_FIEND,ATTRIBUTE_DARK) then
lbl=lbl+TYPE_TRAP lbl=lbl+TYPE_TRAP
end end
e:GetLabelObject():SetLabel(lbl) if e:GetLabel()==1 and lbl~=0 then
end
function c74841885.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()~=0
end
function c74841885.operation(e,tp,eg,ep,ev,re,r,rp)
--disable --disable
local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
if e:GetLabel()==TYPE_SPELL then if lbl==TYPE_SPELL then
e1:SetDescription(aux.Stringid(74841885,0)) e1:SetDescription(aux.Stringid(74841885,0))
elseif e:GetLabel()==TYPE_TRAP then elseif lbl==TYPE_TRAP then
e1:SetDescription(aux.Stringid(74841885,1)) e1:SetDescription(aux.Stringid(74841885,1))
else else
e1:SetDescription(aux.Stringid(74841885,2)) e1:SetDescription(aux.Stringid(74841885,2))
...@@ -55,19 +48,19 @@ function c74841885.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,19 +48,19 @@ function c74841885.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c74841885.distg) e1:SetTarget(c74841885.distg)
e1:SetLabel(e:GetLabel()) e1:SetLabel(lbl)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable effect --disable effect
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetLabel(e:GetLabel()) e2:SetLabel(lbl)
e2:SetOperation(c74841885.disop) e2:SetOperation(c74841885.disop)
e2:SetReset(RESET_EVENT+0x1ff0000) e2:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if bit.band(e:GetLabel(),TYPE_TRAP)~=0 then if bit.band(lbl,TYPE_TRAP)~=0 then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
...@@ -75,9 +68,10 @@ function c74841885.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,9 +68,10 @@ function c74841885.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c74841885.distg) e3:SetTarget(c74841885.distg)
e3:SetLabel(TYPE_TRAP) e3:SetLabel(TYPE_TRAP)
e3:SetReset(RESET_EVENT+0x1ff0000) e3:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
end
end end
function c74841885.distg(e,c) function c74841885.distg(e,c)
return c:IsType(e:GetLabel()) return c:IsType(e:GetLabel())
...@@ -88,3 +82,6 @@ function c74841885.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,3 +82,6 @@ function c74841885.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
end end
function c74841885.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
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