- //TODO 特定外形怪物不會有受傷動作
- boolean action = true;
- L1Object obj = World.get().findObject(targetobj);
- if (obj instanceof L1NpcInstance) {
- L1NpcInstance tgnpc = (L1NpcInstance) obj;
- switch (tgnpc.getTempCharGfx()) {
- case 10913:// 巨型骷髏
- case 2544:// 林德拜爾
- case 23715://吉爾塔斯
- case 23812://
- action = false;
- break;
- }
- }
- if (action) {
- this.writeD(targetobj);// 目標objid
- this.writeH(damage); // 傷害值
- } else {
- this.writeD(0x00);
- this.writeH(0x00):
- }
- this.writeC(npc.getHeading()); // 執行者面向
- this.writeH(0x00); // target x
- this.writeH(0x00); // target y
- this.writeC(0x00); // 0x00:none 0x04:Claw 0x08:CounterMirror
- }
複製代碼
大概就是这样,另外,主程式里面有一个专门用来控制挨打动作的UI文件,可以把相关的Spr编号在里面填一下。