Commit 5bc4dd16 authored by Huangnan's avatar Huangnan

Merge branch 'new-fusion-Lunalight-Wolf' into 'master'

Add 月光狼 to new fusion and hint more message

See merge request !201
parents e25b3cf2 327dc651
Pipeline #37110 passed with stages
in 1 minute and 46 seconds
--月光狼
local s,id,o=GetID()
function s.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
c:RegisterEffect(e1)
--fusion
local e2=FusionSpell.CreateSummonEffect(c,{
fusfilter=s.fusfilter,
pre_select_mat_location=LOCATION_MZONE|LOCATION_GRAVE,
mat_operation_code_map={
{ [LOCATION_REMOVED] = FusionSpell.FUSION_OPERATION_GRAVE },
{ [0xff] = FusionSpell.FUSION_OPERATION_BANISH }
},
})
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
c:RegisterEffect(e2)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_PIERCE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(s.ptg)
c:RegisterEffect(e3)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp)
return not (c:IsSetCard(0xdf) and c:IsType(TYPE_MONSTER)) and bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function s.fusfilter(c)
return c:IsSetCard(0xdf)
end
function s.ptg(e,c)
return c:IsSetCard(0xdf) and c:IsType(TYPE_MONSTER)
end
...@@ -2420,6 +2420,7 @@ function FusionSpell.CreateSummonEffect(c,opts) ...@@ -2420,6 +2420,7 @@ function FusionSpell.CreateSummonEffect(c,opts)
pre_select_mat_opponent_location, pre_select_mat_opponent_location,
gc gc
)) ))
e1:SetDescription(1169) --- 融合召喚
return e1 return e1
end end
...@@ -2681,7 +2682,7 @@ function FusionSpell.GetSummonOperation( ...@@ -2681,7 +2682,7 @@ function FusionSpell.GetSummonOperation(
if #confirm_materials>0 then if #confirm_materials>0 then
Duel.ConfirmCards(1-tp,confirm_materials) Duel.ConfirmCards(1-tp,confirm_materials)
end end
Duel.HintSelection(materials) Duel.HintSelection(materials-confirm_materials)
local operated_material_count=0 local operated_material_count=0
-- perform operations on grouped materials -- perform operations on grouped materials
...@@ -2691,6 +2692,8 @@ function FusionSpell.GetSummonOperation( ...@@ -2691,6 +2692,8 @@ function FusionSpell.GetSummonOperation(
-- mark effect as used once. if count limit reached, reset the effect -- mark effect as used once. if count limit reached, reset the effect
for effect,_ in pairs(applied_extra_effects) do for effect,_ in pairs(applied_extra_effects) do
--- hint opponent that this effect is applied
Duel.Hint(HINT_OPSELECTED,1-tp,effect:GetDescription())
effect:UseCountLimit(tp) effect:UseCountLimit(tp)
if effect:CheckCountLimit(tp)==false then if effect:CheckCountLimit(tp)==false then
effect:Reset() effect:Reset()
...@@ -2705,6 +2708,9 @@ function FusionSpell.GetSummonOperation( ...@@ -2705,6 +2708,9 @@ function FusionSpell.GetSummonOperation(
Duel.SpecialSummonStep(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,sumpos) Duel.SpecialSummonStep(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,sumpos)
end end
else else
--- hint opponent that this effect is applied
Duel.Hint(HINT_OPSELECTED,1-tp,fusion_effect:GetDescription())
--- fusion with chain material --- fusion with chain material
fusion_effect:GetOperation()(e,e,tp,tc,materials,sumtype,sumpos) fusion_effect:GetOperation()(e,e,tp,tc,materials,sumtype,sumpos)
--- use the chain material effect, reset if exhausted --- use the chain material effect, reset if exhausted
......
No preview for this file type
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