Béta:Breeding/System

Process 1: Type Cycle
The Type Cycle exist out 3 stage. The system will only check for opposites on stage 1. When an opposite is detected the stage will be ignored and will skip to stage 3. Add the end of this process when no dragons are generated on the list. An elemental that contains the first element from left parent will generated on the list. On this process, only type combinations are generated.

Stage 1
''Only on stage one, it will check on opposite list. If the containing types are equal, an elemental from that type is generate.''
 * 1) Containing : P1(e1)/P2(e1) if opposite = none;
 * 2) Containing : P1(e1)/P2(e2) if opposite = none; check if P1(e1) = P2(e2)
 * 3) Containing : P1(e1)/P2(e3) if opposite = none; check if P1(e1) = P2(e3)

Stage 2
If the containing types are equal, an elemental from that type is generate.
 * 1) Containing : P1(e2)/P2(e1)
 * 2) Containing : P1(e2)/P2(e2)
 * 3) Containing : P1(e2)/P2(e3)

Stage 3

 * 1) Containing : P1(e1)/P2(e1)/P2(e2)
 * 2) Containing : P1(e2)/P2(e1)/P2(e2)
 * 3) Containing : P1(e3)/P2(e1)/P2(e2)
 * 4) Containing : P2(e1)/P1(e1)/P1(e2)
 * 5) Containing : P2(e2)/P1(e1)/P1(e2)
 * 6) Containing : P2(e3)/P1(e1)/P2(e2)

2) Checking Condition
 * 1) if both dragons from this combination are rare or legend, it will update the list (is stored on user info config.
 * 2) if both L/R contains the same dragon, than that dragon be the result. This will skip proces 3.

Process 2 (checking condition)

 * 1) if Parent A and Parent B result can list an rare or legend dragon. Rare or Legend dragons will be listed on the array list that is stored on your user info config. These settings are are server sided.
 * 2) if Parent A and Parent B contains the same dragon. It's an possibility to get that dragon. This dragon will be add on the array list.
 * 3) if L/R is legend type or pure type. it will added elemental /hybrid / rare dragon on array list. (for legend, is can be different species or same species, for pure + pure you will get pure 100 %)
 * if is pure elemental + any, just read pure elemental as 2 type: pure and elemental. it will generate elemental, hybrid, rare (is matched with what element pure have) ... (if is pure flame, if you combined with non pure like pure flame + coolfire (f/i), other hybrid/elemental/rare dragon is have type ice or flame (is from coolfire))
 * pure + pure elemental, is possibility to get pure too since pure + (pure + elemental), just remember pure + pure = pure, flame + flame = flame. is possible to get pure elemental.
 * to get legend you need 2 rare hybrid. to get pure you need 2 legend type.
 * to get pure elemental, you need pure + elemental or pure elemental + pure elemental.
 * if is flame/flame (from process one), just make them only flame.
 * if A / B is pure elemental, just divide them into 2 type, after devide into 2 type, just re-doing process 1 only 1 times.

Process 3 :
 * we already get list what type must be generated from process one. System will search and matched what dragon, if is found it will added on array list too. like flame/dark, it will search matched type with them, flame/dark is same as dark/flame.
 * after get dragon list, combined with temporary array list (is from process 2).
 * Lets generate rate point from A and B. after calculate RP A and RP B, just A+B = RPT.
 * After got RPT, just checking on difficult slot.
 * After checking what slot is open, and filled that slot with array list dragon randomly. (random : based off internal id dragon).
 * after slot was filled, just remove uncheck slot.
 * after remove uncheck slot, system will randomly pick slot id, what dragon you will get. that after you click a button. and is stored on user info config.

Process 4:
 * is new system. Deus Vault it allow you get unique dragon from breeding. is have specific combination to get them, but on deus vault just give a type hint only.
 * This system still buggy
 * If that combination is matched with DV list, dragon on difficult slot list it will divided. if is 100 % to get unique dragon, you will get 100 % unique dragon. if is 70 %, 30 % chance you will get dragon from difficult rate list, 70 % unique dragon.

System
Before the breeding system starts it will take 2 steps:
 * 1) Check: This system checks if both parents can be bred together. Incase with opposites some combinations could fault. When one of the parents is an elemental. The system will still check for opposites inside the elements from the other parent.
 * 2) Deus Vault: This system checks if there's an recept listed on this combination and if that combination is unlocked or not. If the combination match with the gem recept that is unlocked. You will have a 100% chance to result this dragon from this combination. Incase with unlocked gold recepts this is only 70% and the system will continue to the main system if the recept faults.

Main System
The main system is all about slots and how to unlock them.

Slots
When you are breeding two dragons together the possible results will be listed into 3 different type of slots each with a limit of 10. In total there are 30: Both Unique as Special Dragons will never be listed inside one of these slots. When there are more than 10 dragons that can be listed into a difficulty the dragons will be choisen randomly.

Rate Value
All slots are locked on default. In order to unlock them you will need a specific ammount of rate value. This value is in fact the current earning of your two dragons:

List Calculation
The list calculation get calculated in 4 processes:

1) Type Cycle: (is have 3 stage) if is opposite, it will generate one elemental dragon only (is from first type Left dragon). is just generate type only
 * stage 1 :
 * containing : P1(e1)/P2(e1) if opposite = none;
 * containing : P1(e1)/P2(e2) if opposite = check if P1(e1) = P2(e2)
 * containing : P1(e1)/P2(e3) if opposite = check if P1(e1) = P2(e3)
 * if opposite = P1(e1) Elemental (list won't continue to stage 2)
 * Only on stage one, it will check on opposite list. If the containing types are equal than an elemental from that type is generate.


 * stage 2 :
 * containing : P1(e2)/P2(e1)
 * containing : P1(e2)/P2(e2)
 * containing : P1(e2)/P2(e3)
 * If the containing types are equal than an elemental from that type is generate.


 * stage 3 :
 * containing : P1(e1)/P2(e1)/P2(e2)
 * containing : P1(e2)/P2(e1)/P2(e2)
 * containing : P1(e3)/P2(e1)/P2(e2)
 * containing : P2(e1)/P1(e1)/P1(e2)
 * containing : P2(e2)/P1(e1)/P1(e2)
 * containing : P2(e3)/P1(e1)/P2(e2)

2) Checking Condition
 * 1) if both dragons from this combination are rare or legend, it will update the list (is stored on user info config.
 * 2) if both L/R contains the same dragon, than that dragon be the result. This will skip proces 3.

3) Repeat Process:
 * Array list from process 2 will fill out the slots.

4) Deus Vault:
 * If that combination is matched on an deus vault formula. Your result will depend on the list.

Other
 * The list will not result any elemental dragons if both parents don't have the same element listed.
 * standart elemental : e, w, f, p, m, i , el, d ,l and pu, on breeding is read that type as string, and also every pure elemental is read as two type but all of them are grouped into one type.
 * like pure + pure elemental flame = pu + pf= pu + pu + f = is possible to get pure dragon and pure flame.


 * legend + legend : elemental, hybrid, rare, and pure (is never get legend, when you used same legend type species, you wll get same legend dragon), (is generated any dragon)
 * pure + elemental : elemental, hybrid, rare, and pure elemental, it will not generate legend type dragon and pure dragon. (is containing type from elemental you used)