--Pharaohnic Blades local id,cod=23251007,c23251007 function cod.initial_effect(c) --Equip local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(cod.target) e1:SetOperation(cod.operation) c:RegisterEffect(e1) --Equip Limit local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(cod.eqlimit) c:RegisterEffect(e2) --Draw local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_DRAW) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_SZONE) e3:SetCondition(cod.drcon) e3:SetTarget(cod.drtg) e3:SetOperation(cod.drop) c:RegisterEffect(e3) --ATK local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_EQUIP) e4:SetCode(EFFECT_UPDATE_ATTACK) e4:SetValue(300) c:RegisterEffect(e4) end function cod.eqlimit(e,c) return c:IsSetCard(0xd3e) end function cod.filter(c,tp) return c:IsFaceup() and c:IsSetCard(0xd3e) and c:IsControler(tp) end function cod.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:GetLocation()==LOCATION_MZONE and cod.filter(chkc,tp) end if chk==0 then return Duel.IsExistingTarget(cod.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.SelectTarget(tp,cod.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) end function cod.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,e:GetHandler(),tc) end end function cod.drcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==e:GetHandler():GetEquipTarget() end function cod.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function cod.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end