a place for all your custom card needs you can post scripts pics and request for card to be made also please donate to the funding for a new server made for custom card duels
 
HomePortalLatest imagesSearchRegisterLog in

Share
 

 Random Damage by effect?

View previous topic View next topic Go down 
AuthorMessage
lDarkDemonl

lDarkDemonl


Member Title : lDarkDemonl
Posts : 4
Join date : 2014-04-10
Age : 33
Location : Brazil

Random Damage by effect? Empty
PostSubject: Random Damage by effect?   Random Damage by effect? Icon_minitimeSat Apr 12, 2014 3:00 am

Is this possible?
I would like to make the following effect
"Inflict random damage to your opponent (min. 100 and max. 8000)"
Back to top Go down
StormWing0




Member Title : Over Creative Card Ideas
Posts : 451
Join date : 2013-07-14
Age : 32
Location : Tacoma, WA

Random Damage by effect? Empty
PostSubject: Re: Random Damage by effect?   Random Damage by effect? Icon_minitimeSat Apr 12, 2014 4:01 am

Outside the electronic versions of the game no, but inside them maybe. O_o
Back to top Go down
VB99

VB99


Member Title : Legendary Planet
Posts : 368
Join date : 2013-11-10

Random Damage by effect? Empty
PostSubject: Re: Random Damage by effect?   Random Damage by effect? Icon_minitimeSat Apr 12, 2014 2:26 pm

Maybe you can use math.random(100,8000)or somthing like that.
Back to top Go down
http://www.fanfiktion.de/u/VB99
lDarkDemonl

lDarkDemonl


Member Title : lDarkDemonl
Posts : 4
Join date : 2014-04-10
Age : 33
Location : Brazil

Random Damage by effect? Empty
PostSubject: Re: Random Damage by effect?   Random Damage by effect? Icon_minitimeSat Apr 12, 2014 5:39 pm

VB99 wrote:
Maybe you can use math.random(100,8000)or somthing like that.

It did not work, is inflicting 4552 damage
Back to top Go down
StormWing0




Member Title : Over Creative Card Ideas
Posts : 451
Join date : 2013-07-14
Age : 32
Location : Tacoma, WA

Random Damage by effect? Empty
PostSubject: Re: Random Damage by effect?   Random Damage by effect? Icon_minitimeSat Apr 12, 2014 7:27 pm

lDarkDemonl wrote:
VB99 wrote:
Maybe you can use math.random(100,8000)or somthing like that.

It did not work, is inflicting 4552 damage
Is it consistently the same or not?  If yes than the random generator isn't seeded in the right location.
Back to top Go down
lDarkDemonl

lDarkDemonl


Member Title : lDarkDemonl
Posts : 4
Join date : 2014-04-10
Age : 33
Location : Brazil

Random Damage by effect? Empty
PostSubject: Re: Random Damage by effect?   Random Damage by effect? Icon_minitimeSat Apr 12, 2014 7:35 pm

StormWing0 wrote:
lDarkDemonl wrote:
VB99 wrote:
Maybe you can use math.random(100,8000)or somthing like that.

It did not work, is inflicting 4552 damage
Is it consistently the same or not?  If yes than the random generator isn't seeded in the right location.

Is it consistently the same
I put this way
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage (p,math.random(100,8000),REASON_EFFECT)
Back to top Go down
StormWing0




Member Title : Over Creative Card Ideas
Posts : 451
Join date : 2013-07-14
Age : 32
Location : Tacoma, WA

Random Damage by effect? Empty
PostSubject: Re: Random Damage by effect?   Random Damage by effect? Icon_minitimeSat Apr 12, 2014 7:40 pm

hmm check the code for random dice rolls and coin tosses and see where that code does its random generation.  Should be able to pull from the same location but with different numbers. Razz
Back to top Go down
lDarkDemonl

lDarkDemonl


Member Title : lDarkDemonl
Posts : 4
Join date : 2014-04-10
Age : 33
Location : Brazil

Random Damage by effect? Empty
PostSubject: Re: Random Damage by effect?   Random Damage by effect? Icon_minitimeSat Apr 12, 2014 7:57 pm

StormWing0 wrote:
hmm check the code for random dice rolls and coin tosses and see where that code does its random generation.  Should be able to pull from the same location but with different numbers. Razz

Yes, i am using 4 dices.
d1 and d2 will determine the amount of 100-800
d3 and d4 will determine multiple of 1-10

so if the value is 100 and multiple 1: dmg = 100
if the value is 800 and the multiple 10: dmg = 8000

Seems is working fine, i tested several times and i managed generate random damage between 600-5000+

But I wanted to make sure had no other way more specific. And it seems not have, thanks for the help ^ ^
Back to top Go down
StormWing0




Member Title : Over Creative Card Ideas
Posts : 451
Join date : 2013-07-14
Age : 32
Location : Tacoma, WA

Random Damage by effect? Empty
PostSubject: Re: Random Damage by effect?   Random Damage by effect? Icon_minitimeSat Apr 12, 2014 8:12 pm

Nice to know it works.  What I meant though was to see where those two functions were pulling their random numbers from and to take advantage of that location since that's where the random numbers are likely seeded. Smile 


Creative work around though. Smile
Back to top Go down
Sponsored content





Random Damage by effect? Empty
PostSubject: Re: Random Damage by effect?   Random Damage by effect? Icon_minitime

Back to top Go down
 

Random Damage by effect?

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Magical Hats (Anime) Effect + Dark Sage (Anime) Effect [Help Please]
» Card Effect Functionality you'd like to see
» Help with effect
» Help with Unaffected effect
» Help with a card effect

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: MackPro Discussion-