Commit a79b8af4 authored by 2924713558's avatar 2924713558 Committed by GitHub

Add files via upload

parent 71c08893
--梨花道场 --梨花道场
local m=1131201 local m=1131201
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end) xpcall(function() require("expansions/script/c1110198") end,function() require("script/c1110198") end)
-- --
function c1131201.initial_effect(c) function c1131201.initial_effect(c)
-- --
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0) c:RegisterEffect(e0)
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c1131201.con1) e1:SetCondition(c1131201.con1)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c1131201.tg1) e1:SetTarget(c1131201.tg1)
e1:SetValue(c1131201.val1) e1:SetValue(c1131201.val1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1131201,0)) e2:SetDescription(aux.Stringid(1131201,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,1131201) e2:SetCountLimit(1,1131201)
e2:SetCondition(c1131201.con2) e2:SetCondition(c1131201.con2)
e2:SetTarget(c1131201.tg2) e2:SetTarget(c1131201.tg2)
e2:SetOperation(c1131201.op2) e2:SetOperation(c1131201.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --
end end
-- --
function c1131201.con1(e,tp,eg,ep,ev,re,r,rp) function c1131201.con1(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() return tp==Duel.GetTurnPlayer()
end end
-- --
function c1131201.tg1(e,c) function c1131201.tg1(e,c)
return muxu.check_set_Hinbackc(c) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or c:IsPublic()) return muxu.check_set_Hinbackc(c) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or c:IsPublic())
end end
-- --
function c1131201.val1(e,te) function c1131201.val1(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER)
end end
-- --
function c1131201.cfilter2(c) function c1131201.cfilter2(c)
return muxu.check_set_Hinbackc(c) and c:IsType(TYPE_MONSTER) and c:IsFaceup() return muxu.check_set_Hinbackc(c) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end end
function c1131201.con2(e,tp,eg,ep,ev,re,r,rp) function c1131201.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1131201.cfilter2,1,nil) return eg:IsExists(c1131201.cfilter2,1,nil)
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<1 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<1
end end
-- --
function c1131201.tfilter2(c,e,tp) function c1131201.tfilter2(c,e,tp)
return muxu.check_set_Hinbackc(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==4 return muxu.check_set_Hinbackc(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==4
end end
function c1131201.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c1131201.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1131201.tfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1131201.tfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
-- --
function c1131201.op2(e,tp,eg,ep,ev,re,r,rp) function c1131201.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c1131201.tfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,c1131201.tfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if sg:GetCount()<1 then return end if sg:GetCount()<1 then return end
local sc=sg:GetFirst() local sc=sg:GetFirst()
if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e2_1=Effect.CreateEffect(sc) local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE) e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_UPDATE_ATTACK) e2_1:SetCode(EFFECT_UPDATE_ATTACK)
e2_1:SetValue(600) e2_1:SetValue(600)
e2_1:SetReset(RESET_EVENT+0x1fe0000) e2_1:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e2_1,true) sc:RegisterEffect(e2_1,true)
local e2_2=Effect.CreateEffect(sc) local e2_2=Effect.CreateEffect(c)
e2_2:SetDescription(aux.Stringid(1131201,1)) e2_2:SetDescription(aux.Stringid(1131201,1))
e2_2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2_2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2_2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2_2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2_2:SetCode(EVENT_BATTLED) e2_2:SetCode(EVENT_BATTLED)
e2_2:SetOperation(c1131201.op2_2) e2_2:SetCondition(c1131201.con2_2)
e2_2:SetReset(RESET_EVENT+0x1fe0000) e2_2:SetOperation(c1131201.op2_2)
sc:RegisterEffect(e2_2,true) e2_2:SetReset(RESET_EVENT+0x1fe0000)
local e2_3=Effect.CreateEffect(sc) sc:RegisterEffect(e2_2,true)
e2_3:SetDescription(aux.Stringid(1131201,2)) local e2_3=Effect.CreateEffect(c)
e2_3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2_3:SetDescription(aux.Stringid(1131201,2))
e2_3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2_3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2_3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2_3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2_3:SetOperation(c1131201.op2_3) e2_3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2_3:SetReset(RESET_EVENT+0x1fe0000) e2_3:SetOperation(c1131201.op2_3)
sc:RegisterEffect(e2_3,true) e2_3:SetReset(RESET_EVENT+0x1fe0000)
end sc:RegisterEffect(e2_3,true)
end end
-- end
function c1131201.op2_2(e,tp,eg,ep,ev,re,r,rp) --
local c=e:GetHandler() function c1131201.con2_2(e,tp,eg,ep,ev,re,r,rp)
local bc=c:GetBattleTarget() local c=e:GetHandler()
local e2_2_1=Effect.CreateEffect(c) local bc=c:GetBattleTarget()
e2_2_1:SetType(EFFECT_TYPE_SINGLE) return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
e2_2_1:SetCode(EFFECT_DISABLE) end
e2_2_1:SetReset(RESET_EVENT+0x17a0000) function c1131201.op2_2(e,tp,eg,ep,ev,re,r,rp)
bc:RegisterEffect(e2_2_1) local c=e:GetHandler()
local e2_2_2=Effect.CreateEffect(c) local bc=c:GetBattleTarget()
e2_2_2:SetType(EFFECT_TYPE_SINGLE) local e2_2_1=Effect.CreateEffect(c)
e2_2_2:SetCode(EFFECT_DISABLE_EFFECT) e2_2_1:SetType(EFFECT_TYPE_SINGLE)
e2_2_2:SetReset(RESET_EVENT+0x17a0000) e2_2_1:SetCode(EFFECT_DISABLE)
bc:RegisterEffect(e2_2_2) e2_2_1:SetReset(RESET_EVENT+0x17a0000)
end bc:RegisterEffect(e2_2_1)
-- local e2_2_2=Effect.CreateEffect(c)
function c1131201.op2_3(e,tp,eg,ep,ev,re,r,rp) e2_2_2:SetType(EFFECT_TYPE_SINGLE)
local c=e:GetHandler() e2_2_2:SetCode(EFFECT_DISABLE_EFFECT)
local a=Duel.GetAttacker() e2_2_2:SetReset(RESET_EVENT+0x17a0000)
local d=Duel.GetAttackTarget() bc:RegisterEffect(e2_2_2)
if d==c then a,d=d,a end end
if a~=c or not d or d:IsControler(tp) or not d:IsRelateToBattle() then return end --
local da=d:GetTextAttack() function c1131201.op2_3(e,tp,eg,ep,ev,re,r,rp)
local dd=d:GetTextDefense() local c=e:GetHandler()
if d:IsImmuneToEffect(e) then local a=Duel.GetAttacker()
da=d:GetBaseAttack() local d=Duel.GetAttackTarget()
dd=d:GetBaseDefense() if d==c then a,d=d,a end
end if a~=c or not d or d:IsControler(tp) or not d:IsRelateToBattle() then return end
if da<0 then da=0 end local da=d:GetTextAttack()
if dd<0 then dd=0 end local dd=d:GetTextDefense()
local e2_3_1=Effect.CreateEffect(c) if d:IsImmuneToEffect(e) then
e2_3_1:SetType(EFFECT_TYPE_SINGLE) da=d:GetBaseAttack()
e2_3_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) dd=d:GetBaseDefense()
e2_3_1:SetRange(LOCATION_MZONE) end
e2_3_1:SetCode(EFFECT_SET_ATTACK_FINAL) if da<0 then da=0 end
e2_3_1:SetValue(da) if dd<0 then dd=0 end
e2_3_1:SetReset(RESET_PHASE+PHASE_DAMAGE) local e2_3_1=Effect.CreateEffect(c)
d:RegisterEffect(e2_3_1) e2_3_1:SetType(EFFECT_TYPE_SINGLE)
local e2_3_2=Effect.CreateEffect(c) e2_3_1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2_3_2:SetType(EFFECT_TYPE_SINGLE) e2_3_1:SetRange(LOCATION_MZONE)
e2_3_2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2_3_1:SetCode(EFFECT_SET_ATTACK_FINAL)
e2_3_2:SetRange(LOCATION_MZONE) e2_3_1:SetValue(da)
e2_3_2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2_3_1:SetReset(RESET_PHASE+PHASE_DAMAGE)
e2_3_2:SetValue(dd) d:RegisterEffect(e2_3_1)
e2_3_2:SetReset(RESET_PHASE+PHASE_DAMAGE) local e2_3_2=Effect.CreateEffect(c)
d:RegisterEffect(e2_3_2) e2_3_2:SetType(EFFECT_TYPE_SINGLE)
end e2_3_2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
-- e2_3_2:SetRange(LOCATION_MZONE)
e2_3_2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2_3_2:SetValue(dd)
e2_3_2:SetReset(RESET_PHASE+PHASE_DAMAGE)
d:RegisterEffect(e2_3_2)
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