Last active
September 12, 2018 00:37
-
-
Save Rinatamu/af4304c6891e2246f334f79937498a97 to your computer and use it in GitHub Desktop.
PowerAppsでバトルゲームを作ろう!(その2:戦闘画面) ref: https://qiita.com/rnakamuramartiny/items/ded3774e698a3b4351d8
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
UpdateContext({'1P_Attack_Ponit':(1P_PWR-2P_DFS)+Round((Rand()*5)*'1P_Rand_Times',0)}); | |
If('1P_Attack_Ponit'>0,UpdateContext({'2P_Current_HP':('2P_Current_HP'-'1P_Attack_Ponit')}),""); | |
UpdateContext({'1PTurn':false,'2PTurn':true}) |
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
If('2P_Current_HP'<=0,false,If('1P_Current_HP'<=0,false,'1PTurn')) |
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
If('1P_Current_HP'>0,Round('1P_Current_HP',0)&"/"&1P_MAX_HP,"0/"&1P_MAX_HP) |
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
If(('1P_Current_HP'/1P_MAX_HP) >= 0.5,LightGreen, | |
If(('1P_Current_HP'/1P_MAX_HP) >= 0.3,Yellow,Red)) |
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
'1P_HP_Gage_Frame'.Height-('1P_HP_Gage_Frame'.BorderThickness*2) |
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
('1P_HP_Gage_Frame'.Width-('1P_HP_Gage_Frame'.BorderThickness*2))*('1P_Current_HP'/1P_MAX_HP) |
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
'1P_HP_Gage_Frame'.X+('1P_HP_Gage_Frame'.BorderThickness) |
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
'1P_HP_Gage_Frame'.Y+('1P_HP_Gage_Frame'.BorderThickness) |
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
If(And(IsBlank('1P_Attack_Ponit'),IsBlank('2P_Attack_Ponit')),"", | |
If('1P_Current_HP'<=0,"2Pの勝利!", | |
If('2P_Current_HP'<=0,"1Pの勝利!", | |
If(And('1P_Attack_Ponit'>15,'2PTurn'),Concatenate("1Pは2Pに会心の一撃!2Pは",Text('1P_Attack_Ponit',"[$-ja-JP]####"),"のダメージ"), | |
If(And('1P_Attack_Ponit'>0,'2PTurn'),Concatenate("1Pは2Pにこうげき!2Pは",Text('1P_Attack_Ponit',"[$-ja-JP]####"),"のダメージ"), | |
If(And('1P_Attack_Ponit'<=0,'2PTurn'),"1Pは2Pにダメージを与えられない!", | |
If(And('2P_Attack_Ponit'>15,'1PTurn'),Concatenate("2Pは1Pに会心の一撃!1Pは",Text('2P_Attack_Ponit',"[$-ja-JP]####"),"のダメージ"), | |
If(And('2P_Attack_Ponit'>0,'1PTurn'),Concatenate("2Pは1Pにこうげき!1Pは",Text('2P_Attack_Ponit',"[$-ja-JP]####"),"のダメージ"), | |
"2Pは1Pにダメージを与えられない!")))))))) |
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
UpdateContext({'1P_Current_HP':1P_MAX_HP,'2P_Current_HP':Var_2P_Max_HP}); | |
If(1P_SPD>2P_SPD,UpdateContext({'1PTurn':true,'2PTurn':false}),UpdateContext({'1PTurn':false,'2PTurn':true})); | |
UpdateContext({'1P_Rand_Times':If((1P_LCK-2P_LCK)<0,0.5,(1P_LCK-2P_LCK))}); | |
UpdateContext({'2P_Rand_Times':If((2P_LCK-1P_LCK)<0,0.5,(2P_LCK-1P_LCK))}); | |
UpdateContext({'1P_Attack_Ponit':Blank(),'2P_Attack_Ponit':Blank()}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment