Last active
December 2, 2018 16:41
-
-
Save ThanawatMas/18524244a9922b648867d0017cc1a5c0 to your computer and use it in GitHub Desktop.
Lucky logic for RxOperation Merge & Zip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boolean luckyUser = FortuneQueue.enterNo(API 2) == LuckyCategory.enterNo(API 3) && | |
UserProfile.currentCategory(API 1) == LuckyCategory.category(API 3); | |
if(luckyUser) { | |
boolean receiveSpecialDiscount = | |
((FortuneQueue.luckyScale(API 2) * UserProfile.userExp(API 1))/ UserProfile.expToNextLevel(API 1)) | |
> 1; | |
if(receiveSpecialDiscount) { | |
discountAmount = totalBuy * LuckyCategory.discountRate(API 3); | |
payAmount = totalBuy - discountAmount; | |
System.out.println("ยินดีด้วย คุณได้ส่วนลดพิเศษเพิ่ม " + discountAmount + " บาท | |
ครั้งนี้คุณจ่ายเพียง " + payAmount + " บาทเท่านั้น"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment