--Aqualon the Abyssal Knight local s,id,o=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,Card.IsNeutral,1,1,aux.NOT(Card.IsNeutral),1) --If this card would be destroyed by battle or card effect, you can banish 1 WATER monster from your GY instead. local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_DESTROY_REPLACE) e1:SetTarget(s.reptg) c:RegisterEffect(e1) --If this card is Bigbang Summoned: You can send 1 Level 4 or lower WATER monster from your Deck to the GY; this card gains ATK/DEF equal to half the original ATK/DEF of the sent monster. local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1,{id,0}) e2:SetCondition(s.adcon) e2:SetCost(s.adcost) e2:SetOperation(s.adop) c:RegisterEffect(e2) --If this card destroys an opponent's monster by battle, after damage calculation: you can banish that opponent's monster, then you can banish 1 random card from your opponent's hand. local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCategory(CATEGORY_REMOVE) e3:SetCode(EVENT_BATTLED) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.rmcon) e3:SetTarget(s.rmtg) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end function s.repfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemove() end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_GRAVE,0,1,nil) end if Duel.SelectEffectYesNo(tp,c,96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) return true else return false end end function s.adcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_BIGBANG) end function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelBelow(4) and c:IsAbleToGraveAsCost() end function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) e:SetLabelObject(g:GetFirst()) end function s.adop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabelObject():GetBaseAttack()/2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(e:GetLabelObject():GetBaseDefense()/2) c:RegisterEffect(e2) end end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() e:SetLabelObject(bc) return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsControler(1-tp) and bc:IsRelateToBattle() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) local bc=e:GetLabelObject() if chk==0 then return bc:IsAbleToRemove() end Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local bc=e:GetLabelObject() local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) if bc:IsRelateToBattle() and bc:IsControler(1-tp) then if Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) and g:GetCount()>0 and Duel.SelectYesNo(tp,909) then Duel.BreakEffect() local sg=g:RandomSelect(tp,1) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) end end end