设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 61|回复: 0

[转载发布] KMustDie VX

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    5778

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    25563
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    32235

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    KMustDie VX

    by Kyonides


    Introduction

    Imagine a game world where certain battles won't force you to kill ALL of the enemy troops on screen.

      Well, you can stop doing that right away because now you can make your battle dream come true!

    Just set which troops are mandatory to kill via a script call and that's it!


    You won't have to depend on a tough negotiator to deal with tyrants looking for free lands up for the grabs.


    Script Call - Use natural index values like 1 upto 8 here:
                    Ruby:       
    1. $game_troop.must_die(EnemyIndex1, etc.)
    复制代码


    The Script

                    Ruby:       
    1. # * KMustDie VX * #
    2. #   Scripter : Kyonides
    3. #   v1.0.1 - 2025-09-06
    4. # This scriptlet allows you to set a given number of enemies that must die in
    5. # battle before the player can be proclaimed as the victor there.
    6. # * Script Call * #
    7. # - Enter 1+ Enemy Indexes to set which enemies should die before battle ends.
    8. #   You should use number 1 as the first position available there.
    9. # $game_troop.must_die(EnemyIndex1, etc.)
    10. class Game_Troop
    11.   alias :kyon_must_die_gm_trp_init :initialize
    12.   attr_reader :hunt_targets
    13.   def initialize
    14.     kyon_must_die_gm_trp_init
    15.     @hunt_targets = []
    16.   end
    17.   def dead_now
    18.     @enemies.select {|e| e.dead? }
    19.   end
    20.   def hunt_targets_dead?
    21.     targets = dead_now.map {|e| e.index + 1 }
    22.     @hunt_targets.any? and targets.sort == @hunt_targets
    23.   end
    24.   def must_die(*targets)
    25.     @hunt_targets = targets.sort
    26.   end
    27. end
    28. class Scene_Battle
    29.   alias :kyon_must_die_scn_btl_judge :judge_win_loss
    30.   alias :kyon_must_die_scn_btl_blt_end :battle_end
    31.   def judge_win_loss
    32.     if $game_troop.hunt_targets_dead?
    33.       process_victory
    34.       return true
    35.     else
    36.       kyon_must_die_scn_btl_judge
    37.     end
    38.   end
    39.   def battle_end(result)
    40.     $game_troop.hunt_targets.clear
    41.     kyon_must_die_scn_btl_blt_end(result)
    42.   end
    43. end
    复制代码




    Terms & Conditions

    Free as in beer for non-commercial games.
    Include my nickname in your game credits.
    That's it!



    本贴来自国际rpgmaker官方论坛作者:kyonides处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/kmustdie-vx.179916/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-7-26 03:55 , Processed in 0.092612 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表