Skip to content
View in the app

A better way to browse. Learn more.

MagicDuel Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Spells being overwritten...

Featured Replies

  • Root Admin

It looks like for some reason the default spell casting code (which sets a level 1 duration spell at 8 minutes) is overriding movelock, attacklock, petrify, and probably others.

Luckily the HC has uncovered this. I'm going to go over the code to work out what ones need changing, Please be aware spells may be lasting for shorter periods than you expect.

  • Author
  • Root Admin

Thanks all.

So story time!

 

Yesterday quite late after I had been busy I was informed that Petrify was not working properly and it had been earlier that day. So I spent some time immediately checking into the code as it was deemed important in the HC. As I was rushing I was checking the petrify item and not the petrify spell. The petrify Item runs for 30 minutes although the code, structure, etc, is very similar. This is important later.

Digging into the casting code I found an odd feature where any spells that run set up a trigger, but then if they are cast on others they are then deleted and re-created using a different set of parameters. Because of name shadowing and a few different variable names this actually caused a bug whereby:

Petrify runs, trigger created with X minutes
Petrify deleted from triggers
Petrify trigger re-created, with different params and using a new variable

This is pretty deep into the code and it looks like it has been around for a while but I have now fixed it. However after fixing it I still didn't see petrify being cast for 30 minutes. This is where I left it as I didn't have time to debug and it was already much past midnight for me.

 

Today I investigated again and noticed that I had the wrong spell file, finding the correct spell file did indeed show me that the petrify spell follows the same pattern for spell casting. So the petrify spell has never lasted for 30 minutes.

 

Long story short, Petrify spell level 1 has the standard 8 minute cast duration, it has always been the case. There was a bug that was affecting some items which have a special "longer" duration, but these are now fixed again.

If you have any questions, feel free to post or message me!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Forum Statistics

  • Total Topics 17.5k
  • Total Posts 182.2k

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.