討論區改成需要用https連接才能登錄 https://bbs.yeeapps.com

青怡攻略:討論版

 找回密碼
 立即註冊

注意1:本討論版會員帳號為獨立帳號,與Yeeapps攻略站/青怡攻略Apps會員帳號並不互通。

注意2:由於伺服器Email無法寄信,因此無法經由論壇系統更改密碼,如有需要請直接PM青怡。

12
返回列表 發新帖
樓主: 戰之夢
打印 上一主題 下一主題

[閒聊] AI表簡易判讀。

19

主題

188

帖子

820

積分

高級會員

Rank: 4

積分
820
11#
發表於 2018-9-20 10:21:26 來自手機 | 只看該作者

遊戲指定論壇‧免費廣告

還好沒去做程式員。。 看完有點頭暈了 ~
回復 支持 反對

使用道具 舉報

8

主題

474

帖子

1709

積分

金牌會員

Rank: 6Rank: 6

積分
1709
12#
發表於 2018-9-20 10:54:58 來自手機 | 只看該作者
這個是有字天書啊!分開來很多個別的字看的懂,但,合在一起,就有看沒有懂 厲害,厲害。
回復 支持 反對

使用道具 舉報

5

主題

604

帖子

3109

積分

論壇元老

Rank: 8Rank: 8

積分
3109
13#
發表於 2018-9-20 11:30:37 | 只看該作者
原始碼跟詳細行動分開說明就行了 ,不是每個人都會看if else , true false 或餘數判斷,所以也不要太勉強別人,程式這東西某種程度上很吃天分滴

不過青大應該是看的懂拉~ 畢竟這網頁是他寫的A______A
回復 支持 反對

使用道具 舉報

255

主題

3152

帖子

8062

積分

論壇元老

Rank: 8Rank: 8

積分
8062
14#
 樓主| 發表於 2018-9-20 12:04:29 | 只看該作者
這篇的本意是教學。
目的是讓有心追進度的人可以快速知道詳細的行動模式。
因為網站資料通常都會比較慢出。

很多時候並不詳細,甚至會寫錯。
回復 支持 反對

使用道具 舉報

17

主題

1422

帖子

4387

積分

論壇元老

Rank: 8Rank: 8

積分
4387
15#
發表於 2018-9-20 13:10:09 來自手機 | 只看該作者
戰大是IT人吧!只有IT人才看得懂的外星語言…哈哈哈。難得你那麽在心做註解…給你一百個讚
回復 支持 反對

使用道具 舉報

255

主題

3152

帖子

8062

積分

論壇元老

Rank: 8Rank: 8

積分
8062
16#
 樓主| 發表於 2018-9-20 13:13:50 | 只看該作者
我只是化工廠的小操作員...
回復 支持 反對

使用道具 舉報

3

主題

889

帖子

3220

積分

論壇元老

Rank: 8Rank: 8

積分
3220
17#
發表於 2018-9-20 17:34:36 | 只看該作者
其實程式不難懂
只是被翻譯弄亂了...看了很不舒服
回復 支持 反對

使用道具 舉報

255

主題

3152

帖子

8062

積分

論壇元老

Rank: 8Rank: 8

積分
8062
18#
 樓主| 發表於 2018-9-20 20:41:59 | 只看該作者
ogata 發表於 2018-9-20 17:34
其實程式不難懂
只是被翻譯弄亂了...看了很不舒服

可以去網站看原文喔
回復 支持 反對

使用道具 舉報

255

主題

3152

帖子

8062

積分

論壇元老

Rank: 8Rank: 8

積分
8062
19#
 樓主| 發表於 2018-9-20 20:45:48 | 只看該作者
原文,從AI開始
# AI
###
if   apple == True:
        endTurn()                     

elif isTurnMod(2) and berry == False:
        useSkill(1, 'random')          # Bad Breath (189260): Magic damage (4x, MAG) to all enemies, Inflict all status effects (100%) on all enemies
        berry  = True                  # reset next turn

elif self.HP < 0.8 and once():
        useSkill(2, 'random')          # Bile (189270): Magic damage (10x, MAG) to all enemies, Reduce ATK, DEF, MAG and SPR by 100% for 10 turns to all enemies
        apple  = True                  # reset next turn

elif self.HP < 0.6 and once():
        useSkill(2, 'random')          # Bile (189270): Magic damage (10x, MAG) to all enemies, Reduce ATK, DEF, MAG and SPR by 100% for 10 turns to all enemies
        white += 1                     
        green += 1                     
        apple  = True                  # reset next turn

elif self.HP < 0.4 and once():
        useSkill(2, 'random')          # Bile (189270): Magic damage (10x, MAG) to all enemies, Reduce ATK, DEF, MAG and SPR by 100% for 10 turns to all enemies
        apple  = True                  # reset next turn

elif peach == False:
        useSkill(4, 'random')          # Barrage (189290): Physical damage (3.5x, ATK) to all enemies
        peach  = True                  # reset next turn

elif random() <= 0.33 and white == 1 and isTurnMod(3) and mango == False:
        useSkill(7, 'random')          # Freeze Prey (189320): Magic damage (3x, MAG) to one enemy, Inflict Stop (100%) for 2 turns on one enemy, Reflect all spell(s) for one turn to one enemy
        mango  = True                  # reset next turn

elif random() <= 0.33 and white == 1 and isTurnMod(2) and mango == False:
        useSkill(8, 'random')          # Malboro Song (189330): Magic damage (3x, MAG) to one enemy, Inflict berserk (+0% ATK) on one enemy for 2 turns
        mango  = True                  # reset next turn

elif white == 1 and mango == False:
        useSkill(9, 'random')          # Swallow (189340): [Death], Instant KO (100%) to one enemy
        mango  = True                  # reset next turn

elif unit('1:player?_any').sufferedDamageLastTurn('fire', 'phys') and green == 1 and olive == False:
        useSkill(6, 'random')          # Heat Ray & Freeze Ray (189310): Magic fire and ice damage (11x, MAG) to one enemy, Reduce resistance to Fire and Ice by 50% for 3 turns to one enemy
        olive  = True                  # reset next turn

elif unit('1:player?_any').sufferedDamageLastTurn('fire', 'mag') and green == 1 and olive == False:
        useSkill(6, 'random')          # Heat Ray & Freeze Ray (189310): Magic fire and ice damage (11x, MAG) to one enemy, Reduce resistance to Fire and Ice by 50% for 3 turns to one enemy
        olive  = True                  # reset next turn

elif unit('1:player?_any').sufferedDamageLastTurn('fire', 'phys') and green == 1:
        useSkill(6, 'random')          # Heat Ray & Freeze Ray (189310): Magic fire and ice damage (11x, MAG) to one enemy, Reduce resistance to Fire and Ice by 50% for 3 turns to one enemy
        lemon  = True                  # reset next turn

elif unit('1:player?_any').sufferedDamageLastTurn('fire', 'mag') and green == 1:
        useSkill(6, 'random')          # Heat Ray & Freeze Ray (189310): Magic fire and ice damage (11x, MAG) to one enemy, Reduce resistance to Fire and Ice by 50% for 3 turns to one enemy
        lemon  = True                  # reset next turn

elif random() <= 0.30 and green == 1 and lemon == False:
        useSkill(5, 'random')          # Freeze Ray (189300): Magic ice damage (6x, MAG) to one enemy

elif unit('1:player?_any').sufferedDamageLastTurn('fire', 'phys') and green == 0 and olive == False:
        useSkill(6, 'random')          # Heat Ray & Freeze Ray (189310): Magic fire and ice damage (11x, MAG) to one enemy, Reduce resistance to Fire and Ice by 50% for 3 turns to one enemy
        olive  = True                  # reset next turn

elif unit('1:player?_any').sufferedDamageLastTurn('fire', 'mag') and green == 0 and olive == False:
        useSkill(6, 'random')          # Heat Ray & Freeze Ray (189310): Magic fire and ice damage (11x, MAG) to one enemy, Reduce resistance to Fire and Ice by 50% for 3 turns to one enemy
        olive  = True                  # reset next turn

elif green == 0 and olive == False:
        useSkill(5, 'random')          # Freeze Ray (189300): Magic ice damage (6x, MAG) to one enemy
        olive  = True                  # reset next turn

else:
        useSkill(3, 'random')          # Tentacle (189280): Physical damage (3x, ATK) to one enemy


回復 支持 1 反對 0

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

Archiver|手機版|Yeeapps.com  

GMT+8, 2025-2-7 19:39 , Processed in 0.031585 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表