Lecode Tactical Battle System 0.77.2B

Discussion in 'JS Plugin Releases (RMMV)' started by Lecode, Nov 28, 2016.

  1. pulsusego

    pulsusego Villager Member

    Messages:
    14
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    @Doktor_Q Oh! When I had initially read through the last few messages I'd seen your .zip along with LeCode's github links, but when I came back to try to see about using the plugin I apparently combined the two in my head and thought Lecode's github link *was* the plugin download. Then I promptly got confused about what exactly I was supposed to download or how to use it since it wasn't just a single .js file lol.. In short, I was inattentive and forgot there were two posts with relevant links rather than just the one. ':D Thanks for pointing your plugin/.zip for me though!

    And that's cool to hear, Psychronic! Also, I've downloaded your demo and am gonna take a look at it, just the artwork and cohesion is impressive so far (currently watching the video). Keep it up! Hopefully I'll have something worth showing y'all too, eventually. :)
    Oh, and sorry for the confusion Kes! As Doktro Q said, I was meaning to refer to the add-on/plugin-fix/helpful-doodad that (s)he'd posted earlier up the thread. It didn't occur to me to clarify that. My bad! Thanks for being super civil/friendly about it, though!

    *Edit: Update on the Scan_Command issue!
    I had two problems that needed fixing, and while I'm not 100% sure I understand them (in fact, I'm 100% sure I don't- at least not fully anyway), I got around them anyway! So in case anyone else is having the issue, here's the symptoms:
    1. Scanning an enemy/actor sometimes crashes. Note where the actor is when this occurs; if the problem is anything like my own, it's at or near the top of whichever given map.
    2. Even if the game doesn't crash upon scanning an entity, no window actually appears, despite having text, show_stats, or picture options set up in the actor/enemy notes box. Note this time where the screen is positioned when this is occurring. Again, if it's anything like mine, you're using a wide map (mine for example is 90x25 tiles).
    Now, onto the solutions!
    1. This one's actually pretty simple. I think. Maybe. Anyway what seems to be going on is the plugin attempts to draw the window a certain height above the actor/enemy/event that's being scanned, and if that entity happens to be near the top of the map, the plugin attempts to draw the map in a negative coordinate, at which point it implodes and crashes your game.
    The answer to this problem is to create a buffer at the top of your map, five tiles should be plenty, though depending on the image you use it might need to be slightly higher. I added a buffer at the bottom as well, and while I now realize that it's completely unnecessary the lack of symmetry messes with screen panning and looks really bad, or at least it does in my opinion, anyway.​
    2. It actually turns out that it is drawing the window! The problem lies in that it's drawing the window waaaaaayyy to the left, which isn't particularly helpful given that it was completely off-screen for me. In fact, it was two-ish screen widths away. So I dug through the LeTBS_ScanCommand, LeTBSWindows, and LeUtilities files to figure out what did what where and how and why, and [literally] many hours later I found this:
    Window_TBSScan.prototype.update = function () {
    Window_Base.prototype.update.call(this);

    this._commandWindow.x = this.x;
    this._commandWindow.y = this.y + this.height - this._commandWindow.height + 6;

    if (!this._obj) return;
    var x, y, w;
    if (this._scanData.isEntity) {
    x = this._obj._posX;
    y = this._obj._posY;
    w = this._obj.width();
    } else {
    x = this._obj.screenX();
    y = this._obj.screenY();
    w = $gameMap.tileWidth();
    }
    x -= this.width / 2;
    y -= this.height;
    this.x = x + w / 2;
    this.y = y;
    if (this.y < 0)
    this.y += this.windowHeight();
    while (this.x < 0)
    this.x++;
    while ((this.x + this.width) > Graphics.width)
    this.x--;
    };
    That little nubbin at the bottom, --- while ((this.x + this.width) > Graphics.width) this.x--; ---, is our culprit. Now, I'm no rocket scientist (by which I mean I can't actually read javascript), so I'm sure it's entirely possible that these two lines tacked onto the end here are really, desperately important for something, somewhere, to someone. Buuuuut I commented that sucker out of there
    /* while ((this.x + this.width) > Graphics.width)
    this.x--;*/
    and bam! Problem solved!
    For what it's worth, I followed the logic of that, ahh, paragraph(?) of java down to that point and figured out that it was the limiting factor that was keeping the plugin from drawing the menu beyond a specific point (about x=28 or so), but I honestly have no idea why that bit is there in the first place. I'm not sure what it's preventing. Maybe it's there to stop the plugin from trying to draw the window off the map (to the right)? But given the lack of a 'safety measure' to prevent the same thing happening on the y axis I don't feel like that's the case. If anyone could point out the utility of that last 'while' bit I'd be curious to hear it.

    Also, I just realized how long this post is... sorry about that.. ':D
     
    Last edited: Apr 10, 2019
    Psychronic likes this.
  2. Psychronic

    Psychronic Veteran Veteran

    Messages:
    126
    Likes Received:
    100
    Location:
    Proxima Station - Proxima System
    First Language:
    English
    Primarily Uses:
    RMMV
    Awesome, let me know what you think about it. It's pre-alpha of course but I want it to be as good of a game as possible and I wont get butthurt if things suck about it. Some features are easy to improve but never think of them until somebody suggests it. Thanks!
     
    pulsusego likes this.
  3. Calluses

    Calluses Bee Member

    Messages:
    25
    Likes Received:
    36
    First Language:
    English
    Primarily Uses:
    RMMV
    someone pls save me idk how coding works

    Today I tried adding Yanfly Item Durability into a game with LeTBS and it doesn't seem like the two plugins are compatible. I've had a couple attempts rearranging the plugins, a few tests to make sure it was working without LeTBS, and a couple of looks into the console, but I just can't get it to work. The game returns an error message is when an item breaks during battle.

    So, I've got a bit of information below, and was wondering if anyone could provide me with why the mentioned plugins aren't compatible, and/or if there's a solution to get around it. Thanks.
     

    Attached Files:

    pulsusego likes this.
  4. DjanPiellou

    DjanPiellou Villager Member

    Messages:
    6
    Likes Received:
    4
    First Language:
    French
    Primarily Uses:
    RMMV
    hello, I just downloaded this plugin and being a novice, I was wondering how to perform a triple attack, because it does not work in the skill menu, whether in sequence or if there is already a sequence available in the demo, everything suits me: ')
    thank you in advance ! ( and sorry if my english is bad )
     
    pulsusego likes this.
  5. chengsta

    chengsta Veteran Veteran

    Messages:
    44
    Likes Received:
    7
    First Language:
    english
    Primarily Uses:
    RMMV
    hey guys I downloaded the latest demo by Chaosicaa. Trying to figure things out. Anyway, I was looking in the troops section and saw "Plugin command: LeTBS ForceEventTrigger ById 10". I can't find what that references. There is no events, switches, or variables that have an ID of 10. Anyone know what that does?
     
    pulsusego likes this.
  6. pulsusego

    pulsusego Villager Member

    Messages:
    14
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    @chengsta - So ID 10 in the demo is the event in the top left of the Bandits map/scene. It's named controller, I think? And while it's been renamed, it still has the ID of 10 that it was assigned when it was created. If you double-click on the event on the map (to open its editing menu) the ID should be listed in the top left(?) even if it's been renamed.

    If I remember correctly, the troop event triggers on turn 2 and spawns the two new bandits and the two friendly guard NPCs.

    @DjanPiellou - I took a quick look through LeTBSConfig and couldn't see a particular skill for it, but you could probably adapt
    "lightning_storm": [
    "call: pre-skill",
    "call: lightning_storm_effects, 3",
    "call: post-skill"
    ],

    "lightning_storm_effects": [
    "effects: 1_battlers_in_{aoe}, current_obj, obj_anim",
    "wait: 60"
    ],
    to suit you? I'm not 1000% sure if this is how it works, but if you basically copied the "lightning_storm" sequence and replaced 'call:lightning_storm_effects' with 'atk' I think that would work. Idk, I've not really messed with sequences much yet, lol.
     
    Calluses likes this.
  7. chengsta

    chengsta Veteran Veteran

    Messages:
    44
    Likes Received:
    7
    First Language:
    english
    Primarily Uses:
    RMMV
    thanks
     
    pulsusego likes this.
  8. DjanPiellou

    DjanPiellou Villager Member

    Messages:
    6
    Likes Received:
    4
    First Language:
    French
    Primarily Uses:
    RMMV
    Thank you Pulsusego !
    It work perfectly !
     
    pulsusego likes this.
  9. DjanPiellou

    DjanPiellou Villager Member

    Messages:
    6
    Likes Received:
    4
    First Language:
    French
    Primarily Uses:
    RMMV
    One last little problem that seems important, I do not know if it is me who really have no talent in code or if it is necessary to proceed in another way, but when modify a sequence works perfectly, creating a new one, even copy paste, does not work, still leaving me an error message when i use it :/
    ( sorry if I ask too much question tell me and i'll stop )
     
    pulsusego likes this.
  10. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,312
    Likes Received:
    3,957
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    DjanPiellou, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


    If you want to add something after you posted, please use the 'Edit' button to do so.
     
    pulsusego and DjanPiellou like this.
  11. pulsusego

    pulsusego Villager Member

    Messages:
    14
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    @DjanPiellou I honestly don't really know how to code, either. I just sorta look for bits that seem to do what I want and copy them or tweak them until I get something that works lol. But anyway, here's my attempt:
    "triple_atk": [
    "call: pre-skill",
    "call: atk, 3",
    "call: post-skill"
    ],

    Edit: @DjanPiellou Didn't want to put another reply so hopefully you see this? Put a little edit in your post maybe if you do. :) I'll pm you otherwise. Anyway:
    past it into the same section as the lightning attack I think. Don't replace anything, and keep a space between the different sequences, but should just be good wedged in there with the rest of them.
     
    Last edited: Apr 13, 2019
    DjanPiellou likes this.
  12. DjanPiellou

    DjanPiellou Villager Member

    Messages:
    6
    Likes Received:
    4
    First Language:
    French
    Primarily Uses:
    RMMV
    @pulsusego Thanks !
    Just, i need to put that in the note of the skill or in the Js file ?

    Edit : I see your edit @pulsusego, thanks a lot again !
     
    Last edited: Apr 14, 2019
    pulsusego likes this.
  13. Trihan

    Trihan Speedy Scripter Veteran

    Messages:
    1,483
    Likes Received:
    975
    Location:
    Buckie, Scotland
    First Language:
    English
    Can you paste line 1049 from the item durability plugin? It's attempting to add to an array that doesn't exist, so I'm assuming the TBS modifies that array into something else.
     
    Calluses and pulsusego like this.
  14. Calluses

    Calluses Bee Member

    Messages:
    25
    Likes Received:
    36
    First Language:
    English
    Primarily Uses:
    RMMV
    [​IMG]

    I can make and send over a small version of the game files with the error recreated if that'd make it easier.
     
  15. chengsta

    chengsta Veteran Veteran

    Messages:
    44
    Likes Received:
    7
    First Language:
    english
    Primarily Uses:
    RMMV
    I was looking at the graphics section in the lecode documents. How he explains how to hook pictures to party members doesn't at all match whats in the demo. For example, all that's in lucious's notebox is this:
    <letbs_sprite>
    pose(idle): use_chara
    pose(dead): use_chara, Damage1, 3, 2
    turn_order: auto
    status_sprite: auto
    </letbs_sprite>

    no mention of lucious or even a number/picture name in any folders/files I'm looking through. I know the notetag is from the rtp plugin, but I can't figure out how it just knows to use/where to find lucious sprite.

    And lastly, I can't figure out how to go straight into the lobby when I do a battle test (Like in the demo). It takes me right to a front view battle instead.
    Can anyone help?
     
    Last edited: Apr 13, 2019
  16. pulsusego

    pulsusego Villager Member

    Messages:
    14
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    Alright, I'm having trouble with some eventing commands. I can't work out how to use "LeTBS ForceAction" or "LeTBS Request Action" without it either crashing or doing nothing (returning 'null', presumably).
    Code:
    //- TODO: Handle this with the trigger "action_start"
    Game_Interpreter.prototype.interpretLeTBS_ForceAction = function (args) {
        var entity = this.readEntityForLeTBS(args[0]);
        var item = this.readObjForLeTBS(args[1]);
        var oldActiveAction = JsonEx.makeDeepCopy(BattleManagerTBS.activeAction());
        if (entity && entity.battler().isAlive() && item) {
            BattleManagerTBS.onForcedActionStart(entity);
            BattleManagerTBS.forceAction(item, entity);
        } else
            return false;
        return {
            waitWhile: function (entity) {
                return entity._sequenceManager.isRunning();
            }.bind(this, entity),
    
            onEnd: function (entity, oldActiveAction) {
                BattleManagerTBS.onForcedActionEnd(entity);
                BattleManagerTBS._activeAction = oldActiveAction;
            }.bind(this, entity, oldActiveAction)
        };
    }
    
    //- TODO: Handle this with the trigger "action_start"
    Game_Interpreter.prototype.interpretLeTBS_RequestAction = function (args) {
        var entity = this.readEntityForLeTBS(args[0]);
        var item = this.readObjForLeTBS(args[1]);
        var options = {
            endCallback: function () {
                BattleManagerTBS.cursor().show();
            }
        };
        if (entity && entity.battler().isAlive()) {
            if (item) {
                options.item = item;
                options.behaviorType = item.TagsLetbsAi.type;
                options.behavior = "action_requested";
                if (!options.behaviorType) {
                    throw new Error("[LeTBS] - Requesting an action with no AI tag.");
                }
            } else { //- Requesting generic action (offense, healing, ect)
                var type = args[1].toLowerCase();
                options.behaviorType = type;
                options.behavior = "action_requested";
            }
            var oldData = {
                phase: BattleManagerTBS._subPhase,
                activeAction: JsonEx.makeDeepCopy(BattleManagerTBS.activeAction()),
                actionPerformed: entity._actionPerformed,
                movePerformed: entity._movePerformed
            };
            Lecode.S_TBS.requestedAction = true;
            var target = this.readEntityForLeTBS(args[2]);
            options.entityTarget = target;
            BattleManagerTBS.onRequestedActionStart(entity);
            BattleManagerTBS.startAiTurn(entity, options);
        } else {
            return false;
        };
        return {
            waitWhile: function () {
                return !!Lecode.S_TBS.requestedAction;
            },
    
            update: function () {
                BattleManagerTBS._aiManager.update();
            },
    
            onEnd: function (entity, oldData) {
                BattleManagerTBS._subPhase = oldData.phase;
                BattleManagerTBS._activeAction = oldData.activeAction;
                entity._actionPerformed = oldData.actionPerformed;
                entity._movePerformed = oldData.movePerformed;
            }.bind(this, entity, oldData)
        };
    };
    I've gotten as far as Force/ReqestAction ActiveEntity/Actor(n)/flaggedEntity(string) and then nothing else I've tried after that works. I just can't parse the script to figure out what it's asking for, either. The closest I think I've gotten is putting skill(1) for a RequestAction command and it throws a "requesting an option with no ai tag?" error, though if I put an ai tag ("offensive", "support", etc.) in any given skill it still doesn't work.
    That said, the only reason I've been looking into this is because I can't get around a different issue to begin with, so maybe that'd be better to ask for help on, thinking about it.. Sorry, I've been trying to figure stuff out myself without having to ask too much of people on here but I'm just completely stumped, even after hours of screwing around with this lol..
    I have a battle start with a flag-based WinCondition (and a Prevent ActorDeath, but not really important). When the battle starts, you have a few ai-controlled allies already on the field via <Actor Cell: n> with one available slot for your currently-only character, but I intentionally have it set so that no enemies spawn. Reason being that it's an ambush, so instead I have a <TBS Event> (In notebox of an event) that starts with a comment "<LeTBS> Trigger_Type: battle_start" which goes off just after the Battle Start text fades away. The event moves the camera, adds some entities, FadesIn and ForceMoves them, then resumes normal play (with all enemies taking spots at the end of the turn order).
    The problem is that, in the turn order, one of the ai allies is first, followed by the player. There's a brief window of time between the Battle Start text fading and the camera moving/enemies spawning due to the LeTBS Event, and in that time the camera briefly moves to that 1st allied ai as if they're about to do their turn, though they don't actually do anything (or seemingly have the chance to even try) before the event takes over, and yet once the event does finish and the camera pans back to the 1st allied ai, it just passes its turn as if there were still no available targets for its ai to go after, despite there even being one within striking distance.
    What I've tried to do:
    • I've tried to use Force/RequestAction like I mentioned above to 'simulate' his turn for him by making him move and melee attack the nearby enemy, but can't get that to work.
    • I've tried to figure out a way to utilize Timeline Control commands but they can only be used in certain places, so I don't think there's any good way to apply them here.
    • I've tried to use sequences, since there are LeTBS start/prepare/executeSequence commands in the plugin script, but I can't figure out how to use them, much less what each one is really for in the first place.
    • I've tried LeTBS EndTurn as a workaround (thinking I could either use it to skip the entire first turn to reset the turn order/actions, or if EndTurn is meant to only end a specific entity's turn I'd have used it to skip all the allied turns and let the enemies play- it is an ambush after all)
    • I've even tried LeTBS SetTurn and it seems to just be fantastically crash-happy and I can't work it out at all. I was hoping I could reset his turn, or skip all the allied units and player by setting it to the 1st enemy's turn, or even reset to the 1st AI's turn after trying [and failing- see Force/RequestAction above] to make him pass so that it'd be the player character's turn (2nd in the turn order) when the SetTurn command triggered to set it to the 1st Ai's turn again, effectively resetting the turn order. For reference, the code seems like it only asks for one variable- the entity. ---
      • *Edit: If I plug in FlaggedEntity(xxx) as with any other command that requests an entity, it ends up throwing "Type Error Cannot read property 'updateOnNextTurn' of undefined". Based on the code (pasted in spoiler below) it seems like it passes the first two IF statements "if (entity &&..." and "if (index)" but either that index is invalid somehow or it can't retrieve the entity's turn order for who-the-hell-knows-what-reason. I originally thought it might be failing to find its turn order because it was an event-spawned entity/enemy, but it has the same problem with the allied actors.
        Code:
        Game_Interpreter.prototype.interpretLeTBS_SetTurn = function (args) {
            var entity = this.readEntityForLeTBS(args[0]);
            if (entity && entity.battler().isAlive()) {
                var index = BattleManagerTBS._turnOrder.indexOf(entity);
                if (index) {
                    BattleManagerTBS._activeIndex = index;
                    var order = BattleManagerTBS._turnOrder;
                    this._turnOrderVisual.updateOnNextTurn(this._turnOrder, index);
                    BattleManagerTBS.startTurn();
                } else {
                    return false;
                }
            } else {
                return false;
            }
            return {};
        };
    Like I said, I'm just completely stumped at this point. I've spent far too long on this problem, so for now I'm having to move on and just let the 1st AI awkwardly sit there and skip his first turn. If anyone here could help me figure out how to fix the problem, or at least work around it (via ForceAction or similar), I would seriously appreciate it. Like, a lot.. I'm doing my best to learn my way through this project, and I'm really proud of what I've managed so far and the problems I've been able to solve, but I just can't crack this one on my own. Thanks again for any help!

    @chengsta -
    You mean this? Yeah, it's definitely outdated. Follow the notebox example as it's the correct one. Attempting to use the directions in the documentation will crash you out. That said, the documentation is still really useful! There are only a few bits that are out of date and you'll notice pretty quickly based on the fact that they won't work. :p I don't remember which sections off the top of my head though. I know the Eventing section has a couple bits that are out of date.

    As for the sprites, they're in img/LeTBS/stuffyou'relookingfor, it's like a separate image directory within the image directory. I don't *think* you'll really see it in-editor anywhere though, so you'll have to be browing through the files manually (if you weren't already). Finally, I think you're missing the event that will turn on LeTBS in the first place. It's a basic event, set to autorun, with "Plugin Command : LeTBS ON" followed by "Control Self Switch : A = ON" with a second event page (within the same actual event entity) that just has Self Switch ticked and set to "A" and a trigger that's just 'action button'. It'll need to either be in the starting map that you cut to on starting a new game, to permantently enable it, or it'll need to be triggered just before each battle starts, and before the win conditions are stated. Alternatively, you could put the "Plugin Command : LeTBS ON" before the win conditions/battle start in each event that launches a battle within it.

    If you aren't using the upgraded demo (7.22.b or something like that, it's on the first post) I'd suggest getting it instead. It's just a little more up to date I think.

    @DjanPiellou - I responded to you by editing my previous post, since I wanted to not clutter up the thread too much. Didn't know if you'd noticed it, so wanted to be sure. :)
     
    Last edited: Apr 14, 2019
  17. MetalKing11417

    MetalKing11417 Villager Member

    Messages:
    6
    Likes Received:
    2
    First Language:
    english
    Primarily Uses:
    RMMV
    Hey, Lecode, When you get to making the Tutorial, might I suggest looking through similar examples to show you how to do make one. A good place to start with and emulate might be the ever popular "pokemon Essentials" kit from XP.

    Also, I was wondering if you should make a special class change core for this System, so that the author could conceivably use different sprites for units in different classes, especially if said classes uses non standard sprites for battles.

    On a similar note, this plugin is incompatible with giving the player the ability to change the name of their actors if you want to use animations outside of the default walking and dying animations. (Which I assume comes as a result of how the system designates the animation items- by the actor/enemy's name as opposed to its number, which would probably fix things)
     
    Last edited: Apr 14, 2019
  18. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    573
    Likes Received:
    321
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    @chengsta The entries you're looking at in the demo file are using RTP graphics- look at Duran and Angela, they should specify a sprite to use, which refers to a section in the LeTBSConfig.js file.

    Also, LeTBS can't be used from battle test, because you have to be able to activate the tactical system manually, and also specify what map you're fighting on- neither of which is possible from battle test. I'd suggest making a debug room and testing your battles in-game instead.

    @MetalKing11417: If you read the documentation and examples, you can specify a name to use for the actor's sprites other than their default actor name, which allows you to rename them freely.
     
    Last edited: Apr 14, 2019
    pulsusego and chengsta like this.
  19. chengsta

    chengsta Veteran Veteran

    Messages:
    44
    Likes Received:
    7
    First Language:
    english
    Primarily Uses:
    RMMV
    thanks doktor, that's the default lecode way. There was a rtp plugin which made it much simpler, which is what lucious is using (I can tell because he's using way different notetags than the first 2 actors). But anyway I'll just stick with the default, it seems to work just fine.

    And yea, I just made a debug room.
    Now that I've messed with Lecodes system for an entire day now, I love it so much more than the default rtp battle engine. The potential is humongous.

    Edit: And lastly, one thing that I find annoying is that when they attack or something in battle, there is an empty speech bubble above their heads. I can't figure out how to make them say anything. In the default battle engine, you can just write down what they say in the skills, and it works. but not with lecodes engine :(

    edit2: can anyone help with making a skill that requires 1 empty space behind enemy? I was trying to make a skill that summons a wall that pushes the enemy back one.
     
    Last edited: Apr 14, 2019
  20. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    573
    Likes Received:
    321
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    @chengsta the "use_chara" command is based on the "LeTBS_RTPUse" plugin, which is also covered in the documentation, near the bottom. It's dramatically simpler if you're only using map characters and don't plan to set up complex animations for them, and works entirely off the existing character sheets. It can also be used for enemies, and there's a nice graphic explaining how to configure which sprite they actually use from it.

    The speech bubble is controlled by the "LeTBS_SkillBubble" plugin, which you can disable entirely or for specific skills. Generally speaking, that bubble should show the name of the action being performed (as found in the database), and shouldn't appear for regular attacks. I don't know a lot about how it works, because I turned it off for my project.

    scope_options and scope_select can control which tile you're allowed to select, but you can't use it to check information about surrounding tiles, unfortunately. For what you're suggesting, you might need to mess around with javascript, but I'd suggest trying to build a sequence like:
    Code:
    damage and/or push the enemy on the target cell ( {aoe}_battler or {aoe}_enemy, depending)
    if (code check if the cursor cell still contains an enemy?)
       summon a wall
    
    If there's no enemy, then it just makes a wall.
    If there's an enemy, it does the attack. If the attack pushes the enemy out of the cell, it then creates a wall.
    If there's an enemy and the attack doesn't push them out of the cell, then it can't form the wall, and just caused damage.

    And you could mess around with maybe adding an "else" case so if it can't create the wall, it damages the enemy again or something? There's a lot you can do from there.
     
    MetalKing11417 and chengsta like this.

Share This Page