It is currently 18 Apr 2024, 03:47
   
Text Size

Adding a New Keyword

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Adding a New Keyword

Postby pipsqueak » 12 Apr 2020, 21:53

I'm working on adding my custom cube to Forge and was curious where new keywords are defined? I don't want to have to copy and paste large blocks of code that describe behavior over and over again.
pipsqueak
 
Posts: 5
Joined: 12 Apr 2020, 21:43
Has thanked: 0 time
Been thanked: 0 time

Re: Adding a New Keyword

Postby friarsol » 12 Apr 2020, 23:42

It depends on what the keyword is doing. But its all in Java code.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Adding a New Keyword

Postby pipsqueak » 13 Apr 2020, 20:09

I know enough Java to be dangerous. Let's say I had an action word, Corrupt, which meant "Put a corruption counter on a non-Swamp land you control. It becomes a Swamp." Where would I define that? I'm happy to look at other examples, I don't need a walkthrough, I just need to know where to look.
pipsqueak
 
Posts: 5
Joined: 12 Apr 2020, 21:43
Has thanked: 0 time
Been thanked: 0 time

Re: Adding a New Keyword

Postby friarsol » 14 Apr 2020, 01:20

friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Adding a New Keyword

Postby pipsqueak » 14 Apr 2020, 04:23

Interesting. So given that those files are not in my local version of forge, I assume I need to fork the github repo and rebuild it locally? Just making sure I don't go off in the wrong direction here.
pipsqueak
 
Posts: 5
Joined: 12 Apr 2020, 21:43
Has thanked: 0 time
Been thanked: 0 time

Re: Adding a New Keyword

Postby friarsol » 15 Apr 2020, 01:05

pipsqueak wrote:Interesting. So given that those files are not in my local version of forge, I assume I need to fork the github repo and rebuild it locally? Just making sure I don't go off in the wrong direction here.
Yep. Definitely need the codebase to add keywords.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 26 guests


Who is online

In total there are 26 users online :: 0 registered, 0 hidden and 26 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 26 guests

Login Form