Commit 25ca3577 authored by Nemo Ma's avatar Nemo Ma

0114 wild

parent 7c0af18b
No preview for this file type
--凌操
local m=70002010
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,1,m)
--MoveToField
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PREDRAW)
e0:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e0:SetRange(LOCATION_EXTRA)
e0:SetOperation(cm.op)
c:RegisterEffect(e0)
--Voice1
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PREDRAW)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_ONFIELD)
e1:SetCondition(cm.con2)
e1:SetOperation(cm.op2)
c:RegisterEffect(e1)
--Voice2
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetCondition(cm.con3)
e2:SetOperation(cm.op3)
c:RegisterEffect(e2)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_MZONE,POS_FACEUP_ATTACK,true)
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT)
e1:SetValue(1)
c:RegisterEffect(e1)
--Pos
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_DRAW_COUNT)
e3:SetTargetRange(1,0)
e3:SetValue(cm.value)
Duel.RegisterEffect(e3,tp)
--summon limit
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP)
end
function cm.value(e,c)
local eq=Duel.GetMatchingGroupCount(cm.filter,0,LOCATION_ONFIELD,0,nil)
return eq/2+2
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,chk)
Debug.Message("带兵十万,不如老夫多甲一件")
Debug.Message("轻舟独进,破敌先锋!")
end
function cm.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("呃啊!(落水声)咳,此箭,何来.......")
end
\ No newline at end of file
--破贼校尉·凌操
local m=70002012
local cm=_G["c"..m]
function cm.initial_effect(c)
--code
aux.EnableChangeCode(c,70002010,LOCATION_MZONE+LOCATION_GRAVE)
c:SetUniqueOnField(1,1,70002010)
--MoveToField
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PREDRAW)
e0:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e0:SetRange(LOCATION_EXTRA)
e0:SetOperation(cm.op)
c:RegisterEffect(e0)
--Voice1
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PREDRAW)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_ONFIELD)
e1:SetCondition(cm.con2)
e1:SetOperation(cm.op2)
c:RegisterEffect(e1)
--Voice2
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetCondition(cm.con3)
e2:SetOperation(cm.op3)
c:RegisterEffect(e2)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_MZONE,POS_FACEUP_ATTACK,true)
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT)
e1:SetValue(1)
c:RegisterEffect(e1)
--Pos
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_DRAW_COUNT)
e3:SetTargetRange(1,0)
e3:SetValue(cm.value)
Duel.RegisterEffect(e3,tp)
--summon limit
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP)
end
function cm.value(e,c)
local eq=Duel.GetMatchingGroupCount(cm.filter,0,LOCATION_ONFIELD,0,nil)
return eq/2+2
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,chk)
Debug.Message("三军将才可为帅,东吴水师我为锋。")
Debug.Message("吾激流独进,善建首功。")
end
function cm.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Debug.Message("鼠辈,竟施冷箭…")
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