Commit 0fcf609d authored by salix5's avatar salix5

Merge pull request #299 from nekrozar/patch-1

fix Mind Trust
parents a0360419 8d852021
...@@ -17,8 +17,8 @@ function c38680149.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,8 +17,8 @@ function c38680149.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
end end
function c38680149.filter1(c,e,tp) function c38680149.filter1(c,e,tp)
local lv=c:GetLevel() local lv=math.floor(c:GetLevel()/2)
return lv>=2 and Duel.IsExistingTarget(c38680149.filter2,tp,LOCATION_GRAVE,0,1,nil,lv/2) return lv>0 and Duel.IsExistingTarget(c38680149.filter2,tp,LOCATION_GRAVE,0,1,nil,lv)
end end
function c38680149.filter2(c,lv) function c38680149.filter2(c,lv)
return c:IsLevelBelow(lv) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() return c:IsLevelBelow(lv) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
...@@ -31,7 +31,7 @@ function c38680149.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +31,7 @@ function c38680149.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return Duel.CheckReleaseGroup(tp,c38680149.filter1,1,nil,e,tp) return Duel.CheckReleaseGroup(tp,c38680149.filter1,1,nil,e,tp)
end end
local rg=Duel.SelectReleaseGroup(tp,c38680149.filter1,1,1,nil,e,tp) local rg=Duel.SelectReleaseGroup(tp,c38680149.filter1,1,1,nil,e,tp)
local lv=rg:GetFirst():GetLevel()/2 local lv=math.floor(rg:GetFirst():GetLevel()/2)
e:SetLabel(lv) e:SetLabel(lv)
Duel.Release(rg,REASON_COST) Duel.Release(rg,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
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