Hello!
I'm currently developing roguelike rpg game for android and i'm very satisfied with the results, but i have one question for you about conditional operator (?). In my battle engine, i'm calculating enemy hit chance based on players dexterity: game will generate random integer number between 0 and 51 and if it's less than players dexterity + 10 it will be count as hit. Ok, this works perfect, but now i have added perks to the game that is modifying some gameplay elements. Right now, perk called "Triforce" is adding +20% chance for dodge, so i'm wondering if i can implement it like this:
player.dexterity + 10 + int(player.perk="triforce" ? int((player.dexterity + 10))/5 : 0)[/code:2sbotb0t]
[img="https://s13.postimg.org/46y6242mf/event.jpg"]