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
 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | .
 

 Random Damage by effect?

View previous topic View next topic Go down 
AuthorMessage
lDarkDemonl

avatar


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

PostSubject: Random Damage by effect?   Sat 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
View user profile
StormWing0




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

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

Outside the electronic versions of the game no, but inside them maybe. O_o

_________________
Own Archetypes being worked on: RoseHarpie, OrbLit, Crystal Elemental (No cards yet on the last one).

Current Hamachi Room that isn't full:
Name: StormWing120V3
Pass: 1234

Discord Channel: Instant Invite Let me know if this fails to work right.  If it fully works it'll replace the Hamachi above.

Keep in mind these below are just estimates and even if it says 100% it only means what is needed for the main dueling deck is done
RoseHarpie 50% finished but no code or images
OrbLit 80% finished some images but no code
Crystal Elemental 0% finished
Back to top Go down
View user profile
VB99

avatar


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

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

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

_________________
Back to top Go down
View user profile http://www.fanfiktion.de/u/VB99
lDarkDemonl

avatar


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

PostSubject: Re: Random Damage by effect?   Sat 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
View user profile
StormWing0




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

PostSubject: Re: Random Damage by effect?   Sat 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
View user profile
lDarkDemonl

avatar


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

PostSubject: Re: Random Damage by effect?   Sat 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
View user profile
StormWing0




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

PostSubject: Re: Random Damage by effect?   Sat 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

_________________
Own Archetypes being worked on: RoseHarpie, OrbLit, Crystal Elemental (No cards yet on the last one).

Current Hamachi Room that isn't full:
Name: StormWing120V3
Pass: 1234

Discord Channel: Instant Invite Let me know if this fails to work right.  If it fully works it'll replace the Hamachi above.

Keep in mind these below are just estimates and even if it says 100% it only means what is needed for the main dueling deck is done
RoseHarpie 50% finished but no code or images
OrbLit 80% finished some images but no code
Crystal Elemental 0% finished
Back to top Go down
View user profile
lDarkDemonl

avatar


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

PostSubject: Re: Random Damage by effect?   Sat 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
View user profile
StormWing0




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

PostSubject: Re: Random Damage by effect?   Sat 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

_________________
Own Archetypes being worked on: RoseHarpie, OrbLit, Crystal Elemental (No cards yet on the last one).

Current Hamachi Room that isn't full:
Name: StormWing120V3
Pass: 1234

Discord Channel: Instant Invite Let me know if this fails to work right.  If it fully works it'll replace the Hamachi above.

Keep in mind these below are just estimates and even if it says 100% it only means what is needed for the main dueling deck is done
RoseHarpie 50% finished but no code or images
OrbLit 80% finished some images but no code
Crystal Elemental 0% finished
Back to top Go down
View user profile
Sponsored content





PostSubject: Re: Random Damage by effect?   

Back to top Go down
 

Random Damage by effect?

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

 Similar topics

-
» Types Of Damage.( battle, effect and direct )
» Breeding Bristlenose, What effect to Hormones have?
» Gladiator Beast Effect.
» Completely random quotes, taken from completely random posts
» Pair of pale blue bark effect vases.

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