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

[制作教程] How To: Encore Skill (Pokemon)

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

    连续签到: 2 天

    [LV.7]常住居民III

    4446

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 4 天前 | 显示全部楼层 |阅读模式
    For those of you who've never played Pokemon before, Encore is a skill that locks the target into repeating the last skill they used, and prevents them from taking other actions.

    To create this effect, we'll be using a few Yanfly Scripts
    Buffs & States Core
    Skill Core
    Auto Passive States

    Step 1 'Last Skill' Tracking state
    Create a state and place the following into it's notetag
    Spoiler                Code:       
    //Stores The User's Last used skill. Bypasses items for use with Encore<Custom Passive Condition>if($gameParty.inBattle()){condition = true;} else {condition = false;}</Custom Passive Condition><Custom Turn Start Effect>user._LastActionId = user._LastActionId || 0;</Custom Turn Start Effect><Custom Remove Effect>user._LastActionId = 0;</Custom Remove Effect><Custom Initiate Effect>var action = user.currentAction();if (action && action.isSkill()) {actionId = action.item().id || 0;if(actionId != x) {//Set X equal to your "Keep Playing Skill" that I'll discuss later.//You can also add "|| actionId != x" within the parentheses if there are other skills you don't want to be Encored.user._LastActionId = action.item().id;}}</Custom Initiate Effect>






    I also tick 'Remove at Battle End', just incase.

    Add this state as a passive to all of your actors and enemies.

    This state

    • Passively Adds itself at the start of battle
    • At the start of every action, if the action was a skill that is not exempt, sets that to the subject's Last Skill Used
    • Removes itself outside of battle
    • Sets itself up with a default "Last Skill Used" of 0, meaning combatants who have not taken action yet in battle won't be encored.

    Step 2: Setting Up your "Encore" State
    Create another state.  I call mine "Keep Playing"
    Create a new skill type called "Encore" and have this state add that skill type.
    Create a skill called "Keep Playing".
    With this state afflicted, Seal all of the user's skill types except for the Encore type.  Additionally, add the "Keep Playing" Skill while the subject has this state.
    Have this state also seal the "Attack, Guard, Wait, & Escape Skills"
    Tick "Remove at Battle End" and
    I recommend you tick auto-removal, so that actors eventually escape encore naturally

    Step 3: Setting up your "Encore & "Keep Playing" skills
    Add an "Encore" skill

    For "Encore"
    Set the target as you like.  I recommend "1 enemy" for accuracy to pokemon.
    Set the hit type to "Certain Hit" unless you'd prefer it to be able to miss, then use either other option.

    In encore's notetag add
    Spoiler                Code:       
    <After Eval>if(target._LastActionId > 0){target.addState(X);//Replace "X" with the ID of your "Encore" State}</After Eval>






    This skill will make sure the target's _LastActionID is greater than 0, meaning they've made some action that can be Encored during battle.

    Then in your "Keep Playing Skill"
    Set the scope to "The User" and the Skill type to Encore
    Add this in it's notebox
    Spoiler                Code:       
    <After Eval>if(user.canPaySkillCost(user._LastActionId)){user.forceAction(user._LastActionId, -1);}else{user.forceAction(WAIT SKILL ID, -1);}BattleManager.forceAction(user);</After Eval><Cast Animation: 0>






    This will force the user to use the Skill with the ID matching their last skill used.

    Because all other actions are sealed aside from the "Keep Playing" Skill, the user will be forced to use this skill until the state is removed.

    You can optionally use Hime - Actor Battle Commands to disable item use as well.


    本贴来自国际rpgmaker官方论坛作者:OverlyEpux处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/how-to-encore-skill-pokemon.95533/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 14:20 , Processed in 0.065956 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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