{"action":"created","issue":{"url":"https://api.github.com/repos/rathena/rathena/issues/1768","repository_url":"https://api.github.com/repos/rathena/rathena","labels_url":"https://api.github.com/repos/rathena/rathena/issues/1768/labels{/name}","comments_url":"https://api.github.com/repos/rathena/rathena/issues/1768/comments","events_url":"https://api.github.com/repos/rathena/rathena/issues/1768/events","html_url":"https://github.com/rathena/rathena/issues/1768","id":193674551,"number":1768,"title":"Tarot Card effect and rng rates dont' match official","user":{"login":"mrjnumber1","id":8746741,"avatar_url":"https://avatars.githubusercontent.com/u/8746741?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjnumber1","html_url":"https://github.com/mrjnumber1","followers_url":"https://api.github.com/users/mrjnumber1/followers","following_url":"https://api.github.com/users/mrjnumber1/following{/other_user}","gists_url":"https://api.github.com/users/mrjnumber1/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjnumber1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjnumber1/subscriptions","organizations_url":"https://api.github.com/users/mrjnumber1/orgs","repos_url":"https://api.github.com/users/mrjnumber1/repos","events_url":"https://api.github.com/users/mrjnumber1/events{/privacy}","received_events_url":"https://api.github.com/users/mrjnumber1/received_events","type":"User","site_admin":false},"labels":[{"id":144958613,"url":"https://api.github.com/repos/rathena/rathena/labels/bug:skill","name":"bug:skill","color":"339966","default":false},{"id":281676024,"url":"https://api.github.com/repos/rathena/rathena/labels/mode:prerenewal","name":"mode:prerenewal","color":"ffffff","default":false},{"id":281675764,"url":"https://api.github.com/repos/rathena/rathena/labels/mode:renewal","name":"mode:renewal","color":"ffffff","default":false},{"id":144959741,"url":"https://api.github.com/repos/rathena/rathena/labels/priority:low","name":"priority:low","color":"bfe5bf","default":false},{"id":162636670,"url":"https://api.github.com/repos/rathena/rathena/labels/server:map","name":"server:map","color":"7AA4FF","default":false},{"id":48292317,"url":"https://api.github.com/repos/rathena/rathena/labels/status:confirmed","name":"status:confirmed","color":"0040FF","default":false}],"state":"closed","locked":false,"assignee":{"login":"Playtester","id":3785983,"avatar_url":"https://avatars.githubusercontent.com/u/3785983?v=3","gravatar_id":"","url":"https://api.github.com/users/Playtester","html_url":"https://github.com/Playtester","followers_url":"https://api.github.com/users/Playtester/followers","following_url":"https://api.github.com/users/Playtester/following{/other_user}","gists_url":"https://api.github.com/users/Playtester/gists{/gist_id}","starred_url":"https://api.github.com/users/Playtester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Playtester/subscriptions","organizations_url":"https://api.github.com/users/Playtester/orgs","repos_url":"https://api.github.com/users/Playtester/repos","events_url":"https://api.github.com/users/Playtester/events{/privacy}","received_events_url":"https://api.github.com/users/Playtester/received_events","type":"User","site_admin":false},"assignees":[{"login":"Playtester","id":3785983,"avatar_url":"https://avatars.githubusercontent.com/u/3785983?v=3","gravatar_id":"","url":"https://api.github.com/users/Playtester","html_url":"https://github.com/Playtester","followers_url":"https://api.github.com/users/Playtester/followers","following_url":"https://api.github.com/users/Playtester/following{/other_user}","gists_url":"https://api.github.com/users/Playtester/gists{/gist_id}","starred_url":"https://api.github.com/users/Playtester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Playtester/subscriptions","organizations_url":"https://api.github.com/users/Playtester/orgs","repos_url":"https://api.github.com/users/Playtester/repos","events_url":"https://api.github.com/users/Playtester/events{/privacy}","received_events_url":"https://api.github.com/users/Playtester/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2016-12-06T03:32:54Z","updated_at":"2016-12-08T09:16:21Z","closed_at":"2016-12-07T20:29:03Z","body":"Currently our `CG_TAROTCARD` is very wonky, with a 1/14 chance of running off each its effects, but looking in aegis every effect has a variable chance, a few of the effects seem to be slightly different as well. for example the break card only affects helm, shield, and body armor.\r\n\r\nhere's my **UNTESTED** version working from disassembly to compare\r\n\r\n```\r\n// inside skill_castend_nodamage_id\r\n\tcase CG_TAROTCARD:\r\n\t\tif( rnd() % 100 > skill_lv * 8 || (tsc && tsc->data[SC_BASILICA]) ||\r\n\t\t(dstmd && ((dstmd->guardian_data && dstmd->mob_id == MOBID_EMPERIUM) || status_get_class_(bl) == CLASS_BATTLEFIELD)) ) {\r\n\t\t\t\r\n\t\t\tif( sd )\r\n\t\t\t\tclif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);\r\n\r\n\t\t\tmap_freeblock_unlock();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\tstatus_zap(src,0,skill_get_sp(skill_id,skill_lv)); \r\n\t\tclif_specialeffect(bl, 523 + skill_tarotcard(src, bl, skill_id, skill_lv, tick), AREA);\r\n\t\tclif_skill_nodamage(src,bl,skill_id,skill_lv,1);\r\n\t\t\r\n\t\tbreak;\r\n\r\n\r\n// and skill_tarotcard function below\r\n/**\r\n * Process tarot card's effects\r\n * @ param src caster of CG_TAROTCARD\r\n * @ param target target of tarot\r\n * @ param skill_id id of the skill (hopefully, CG_TAROTCARD!)\r\n * @ param skill_lv level of skill_id used\r\n * @ param tick processing tick time\r\n * TODO: clean me up and vanish some magic numbers ?\r\n **/\r\nstatic int skill_tarotcard(struct block_list* src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int tick)\r\n{\r\n\tint rate = rnd() % 100;\r\n\t\r\n\tif (rate < 10) // THE FOOL\r\n\t{\r\n\t\tstatus_percent_damage(src, target, 0, 100, false);\r\n\t\treturn 1;\r\n\t}\r\n\telse if (rate < 20)  // THE MAGICIAN\r\n\t{\r\n\t\tsc_start(src, target, SC_INCMATKRATE, 100, -50, skill_get_time2(skill_id, skill_lv));\r\n\t\treturn 2;\r\n\t}\r\n\telse if (rate < 30) // THE HIGH PRIESTESS\r\n\t{\r\n\t\tstatus_change_clear_buffs(target, SCCB_BUFFS | SCCB_CHEM_PROTECT);\r\n\t\treturn 3;\r\n\t}\r\n\telse if (rate < 37) // THE CHARIOT\r\n\t{\r\n\t\tstatus_fix_damage(src, target, 1000, 0);\r\n\t\tclif_damage(src,target,tick,0,0,1000,0,DMG_NORMAL,0,false);\r\n\t\tif( !status_isdead(target) ) \r\n\t\t{\r\n\t\t\tunsigned short where[] = { EQP_ARMOR, EQP_SHIELD, EQP_HELM};\r\n\t\t\tskill_break_equip(src, target, where[rnd() % 3], 10000, BCT_ENEMY);\r\n\t\t}\r\n\t\t\t\r\n\t\treturn 4;\r\n\t}\r\n\telse if (rate < 47) // STRENGTH\r\n\t{\r\n\t\tsc_start(src,target,SC_INCATKRATE,100,-50,skill_get_time2(skill_id,skill_lv));\r\n\t\t\r\n\t\treturn 5;\r\n\t}\r\n\telse if (rate < 62) // THE LOVERS\r\n\t{\r\n\t\tstatus_heal(src, 2000, 0, 0);\r\n\t\tif( !map_flag_vs(target->m) )\r\n\t\t\tunit_warp(target, -1,-1,-1, CLR_TELEPORT);\r\n\t\t\r\n\t\treturn 6;\r\n\t}\r\n\telse if (rate < 63) // WHEEL OF FORTUNE\r\n\t{\r\n\t\t// i suppose a nightmare scenario exists where\r\n\t\t// this ends up occuring recursively but if so you made a miracle !!\r\n\t\tskill_tarotcard(src, target, skill_id, skill_lv, tick);\r\n\t\tskill_tarotcard(src, target, skill_id, skill_lv, tick);\r\n\t\t\r\n\t\treturn 7;\r\n\t}\r\n\telse if (rate < 69) // THE HANGED MAN\r\n\t{\r\n\t\tenum sc_type sc[] = { SC_STOP, SC_FREEZE, SC_STONE };\r\n\t\tuint8 rand_eff = rnd()%3;\r\n\r\n\t\tsc_start2(src,target,sc[rand_eff],100,skill_lv,(rand_eff == 2 ? src->id : 0),skill_get_time2(skill_id,skill_lv));\r\n\t\t\r\n\t\treturn 8;\r\n\t}\r\n\telse if (rate < 74) // DEATH\r\n\t{\r\n\t\tstatus_change_start(src, target, SC_COMA, 10000, skill_lv, 0, src->id, 0, 0, SCSTART_NONE);\r\n\t\tsc_start(src,target,SC_CURSE,100,skill_lv,skill_get_time2(skill_id,skill_lv));\r\n\t\tsc_start2(src,target,SC_POISON,100,skill_lv,src->id,skill_get_time2(skill_id,skill_lv));\r\n\t\t\r\n\t\treturn 9;\r\n\t}\r\n\telse if (rate < 82) // TEMPERANCE\r\n\t{\r\n\t\tsc_start(src,target,SC_CONFUSION,100,skill_lv,skill_get_time2(skill_id,skill_lv));\r\n\t\t\r\n\t\treturn 10;\r\n\t}\r\n\telse if (rate < 83) // THE DEVIL\r\n\t{\r\n\t\tstatus_fix_damage(src, target, 6666, 0);\r\n\t\tclif_damage(src,target,tick,0,0,6666,0,DMG_NORMAL,0,false);\r\n\t\tsc_start(src,target,SC_INCATKRATE,100,-50,skill_get_time2(skill_id,skill_lv));\r\n\t\tsc_start(src,target,SC_INCMATKRATE,100,-50,skill_get_time2(skill_id,skill_lv));\r\n\t\tsc_start(src,target,SC_CURSE,skill_lv,100,skill_get_time2(skill_id,skill_lv));\r\n\t\t\r\n\t\treturn 11;\r\n\t}\r\n\telse if (rate < 85) // THE TOWER\r\n\t{\r\n\t\tstatus_fix_damage(src, target, 4444, 0);\r\n\t\tclif_damage(src,target,tick,0,0,4444,0,DMG_NORMAL,0,false);\r\n\t\t\r\n\t\treturn 12;\r\n\t}\r\n\telse if (rate < 90) // THE STAR\r\n\t{\t\r\n\t\tsc_start(src,target,SC_STUN,100,skill_lv,5000);\r\n\t\t\r\n\t\treturn 13;\r\n\t}\r\n\telse // THE SUN\r\n\t{\r\n\t\tsc_start(src,target,SC_INCATKRATE,100,-20,skill_get_time2(skill_id,skill_lv));\r\n\t\tsc_start(src,target,SC_INCMATKRATE,100,-20,skill_get_time2(skill_id,skill_lv));\r\n\t\tsc_start(src,target,SC_INCHITRATE,100,-20,skill_get_time2(skill_id,skill_lv));\r\n\t\tsc_start(src,target,SC_INCFLEERATE,100,-20,skill_get_time2(skill_id,skill_lv));\r\n\t\tsc_start(src,target,SC_INCDEFRATE,100,-20,skill_get_time2(skill_id,skill_lv));\r\n\t\t\r\n\t\treturn 14;\r\n\t}\r\n}\r\n```\r\n\r\nit's possible i spaghetti myself with how it's written and left a gap somewhere in the ifs, sorry im in a rush atm!i did my best to convert from disassembly to this and likely screwed up, so please double triple check before implementation.\r\n\r\ni didnt see specifically if the sun attacked hit/flee/def but it was stated as such on irowiki so it seems accurate. this will help alleviate a lot of the painful rng involved in CG_TAROTCARD, some have higher chance effects, and some have much lower as you can see (1% on dmgs, 5% coma instead of ~7%, etc!)\r\n"},"comment":{"url":"https://api.github.com/repos/rathena/rathena/issues/comments/265691481","html_url":"https://github.com/rathena/rathena/issues/1768#issuecomment-265691481","issue_url":"https://api.github.com/repos/rathena/rathena/issues/1768","id":265691481,"user":{"login":"anacondaqq","id":9905636,"avatar_url":"https://avatars.githubusercontent.com/u/9905636?v=3","gravatar_id":"","url":"https://api.github.com/users/anacondaqq","html_url":"https://github.com/anacondaqq","followers_url":"https://api.github.com/users/anacondaqq/followers","following_url":"https://api.github.com/users/anacondaqq/following{/other_user}","gists_url":"https://api.github.com/users/anacondaqq/gists{/gist_id}","starred_url":"https://api.github.com/users/anacondaqq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anacondaqq/subscriptions","organizations_url":"https://api.github.com/users/anacondaqq/orgs","repos_url":"https://api.github.com/users/anacondaqq/repos","events_url":"https://api.github.com/users/anacondaqq/events{/privacy}","received_events_url":"https://api.github.com/users/anacondaqq/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T09:16:21Z","updated_at":"2016-12-08T09:16:21Z","body":"> That will be a drama we won't even care. It is specified in the goals of rAthena that we aims to emulate official behaviors, and we assume that our users know this fact from the start.\r\n\r\nYou need to look for compromises and not to shout about what you do not care. RO scena very small for now, and very old. There are no new players anymore since 2010? Or earlier? Every change which breaks the usual game - kills RO, because players do not accept such changes, even if they are official, and there are no point for return for server owners because of luck options at server-side to switch back option \"how it was for years\", even if it wrong and not official behavior. Because server ownsers keeping players to play RO, not showing to them \"official features, when 99% of all RO players were played on eAthena based emulators for 10+ years with current mechanic\".\r\n\r\nBut if keeping balance between official and classic \"usual eAthena behavior for players\" will save a lot of players, and will resolve a lot of problems. It's called \"compromise\". \r\n\r\nAnyway, it's really sad to see that some member from rAthena developers saying: \"we don't even care about critical stuff which will kick off a lot of players from servers\". Nothing to say about it, it's your choice 😧 "}}
{"actor":{"display_login":"anacondaqq"}}