obj
LOB
card
var
attribute
monster_type
monster_sub_type
level
flavour_text
effect
attack
defense
set_name
status
rarity
Normal_Monster
TriHornedDragon
name = "Tri-Horned Dragon"
attribute = "DARK"
level = "8 stars"
monster_type = "Dragon"
flavour_text = "An unworthy dragon with three sharp horns sprouting from its head."
attack = "2850"
defense = "2350"
set_name = "LOB-000"
status = "1st Edition"
rarity = "(ScR)"
BlueEyesWhiteDragon
name = "Blue-Eyes White Dragon"
attribute = "LIGHT"
level = "8 stars"
monster_type = "Dragon"
flavour_text = "This legendary dragon is a powerful engine of destruction. Virtually invincible, very few have faced this awesome creature and lived to tell the tale."
attack = "3000"
defense = "2500"
set_name = "LOB-001"
status = "1st Edition"
rarity = "(UR)"
Fusion_Monster
FlameSwordsman
name = "Flame Swordsman"
attribute = "FIRE"
level = "5 stars"
monster_type = "Warrior"
monster_sub_type = "Fusion"
flavour_text = "Flame Manipulator + Maskai the Legendary Swordsman"
attack = "1800"
defense = "1600"
set_name = "LOB-003"
status = "1st Edition"
rarity = "(SR)"
CharubinTheFireKnight
name = "Charubin The Fire Knight"
attribute = "FIRE"
level = "3 stars"
monster_type = "Pyro"
monster_sub_type = "Fusion"
flavour_text = "Monster Egg + Hinotoma Soul"
attack = "1100"
defense = "800"
set_name = "LOB-015"
status = "1st Edition"
rarity = "(R)"
Spell_Card
PotofGreed
name = "Pot of Greed"
card_type = "Normal Spell"
effect = "Draw 2 cards from your deck."
set_name = "LOB-???"
status = "1st Edition"
rarity = "(SR)"
All the cards follow that kind of structure...now for a Booster Pack that has all 100+ of these cards attached to it I guess like so?:
obj
Packs
LOB
for(var/obj/LOB/card/Normal_Monster/Effect_Monster/Fusion_Monster/Spell_Card)
icon = 'Legend of the Blue Eyes.dmi'
price = 50
I already defined the var known as price. Since I am but a novice coder/programmer and am still learning, my questions are:
-How would I be able to get 9 cards out of those 100+ cards to be randomly picked every time someone buys and opens these packs?
-I added the rarities but am not sure if I described them correctly enough to have them be apart of a probability system, so any help with that?
If you are going to be having values which are all similar, such as different styles of card elements, you should do so by storing them in a list:
obj/var/card_element_list = list(Dark,Light,Fire,Water,Stone)
For probability, use the procedure prob. Ex.