Check out Atomic Chess, our featured variant for November, 2024.

Enter Your Reply

The Comment You're Replying To
Bob Greenwade wrote on Wed, Oct 4, 2023 03:29 PM UTC in reply to H. G. Muller from 09:26 AM:

OK, so currently Post-Move 1:

gosub HandleMove false;
set vic2 #victim;
if == H #mover:
  set p path #ori #desti;
  set k count #p;
  do while #k:
    dec k;
    set sqr elem #k #p;
    set v space #sqr;
    if isupper #v:
      break;
    endif;
    empty #sqr;
    if == K #v:
      set victim K;
    elsif == Q #v;
      set vic2 Q;
    endif;
  loop;
endif;
if == k #victim:
  set brd $space;
  set p search pr #brd;
  if #p:
    add k #p;
  endif;
endif;
if == q #vic2:
  set brd $space;
  set p search pc #brd;
  if #p:
    add q #p;
  endif;
endif;

And Post-Move 2:

gosub HandleMove true;
set vic2 #victim;
if == h #mover:
  set p path #ori #desti;
  set k count #p;
  do while #k:
    dec k;
    set sqr elem #k #p;
    set v space #sqr;
    if isupper #v:
      break;
    endif;
    empty #sqr;
    if == k #v:
      set victim k;
    elsif == q #v;
      set vic2 q;
    endif;
  loop;
endif;
if == K #victim:
  set brd $space;
  set p search PR #brd;
  if #p:
    add K #p;
  endif;
endif;
if == Q #vic2:
  set brd $space;
  set p search PC #brd;
  if #p:
    add Q #p;
  endif;
endif;

Hopefully I have all of the capitalizations and instruction order correct.

I do think I have something screwy in the Pre-Game, though; when I press the Run button, I get a text list of legal moves for White, one per line, before the board. The Pre-Game looks like this:

include /membergraphics/MSgame-code-generation/betza.txt;
set legdefs


(I'll skip the move definitions for now)

def P cond #0 1 0;
def p cond #0 22 0;
def N cond #0 43 0;
def n cond #0 43 0;
def B cond #0 144 0;
def b cond #0 144 0;
def R cond #0 165 0;
def r cond #0 165 0;
def Q cond #0 186 0;
def q cond #0 186 0;
def PC cond #0 227 0;
def pc cond #0 227 0;
def C cond #0 288 0;
def c cond #0 288 0;
def F cond #0 349 0;
def f cond #0 349 0;
def NR cond #0 470 0;
def nr cond #0 470 0;
def PR cond #0 511 0;
def pr cond #0 511 0;
def SL cond #0 572 0;
def sl cond #0 603 0;
def W cond #0 634 0;
def w cond #0 634 0;
def BR cond #0 931 0;
def br cond #0 931 0;
def A cond #0 1700 0;
def a cond #0 1700 0;
def BO cond #0 1793 0;
def bo cond #0 1793 0;
def L cond #0 2338 0;
def l cond #0 2338 0;
def H cond #0 2419 0;
def h cond #0 3997 0;
def GN cond #0 5575 0;
def gn cond #0 5575 0;
def SG cond #0 5616 0;
def sg cond #0 5616 0;
def SP cond #0 5642 0;
def sp cond #0 5642 0;
def K cond #0 5703 0;
def k cond #0 5703 0;

set wroyal (Pr K);
set broyal (pr k);
set morphers (P p SL sl SG sg);
set morphs assoc
  P ((All N))
  p ((All n))
  SL ((All H))
  sl ((All h))
  SG ((All L))
  sg ((All l))
;
set extinction 1; // must capture all royals to win
set promotables (P p Sl sl Sg sg); // pieces that can promote
set supply array; // in infinite supply
set promotab (         // allowed choices per rank
  (n l h)
  0
  0
  0
  0
  0
  0
  0
  0
  0
  0
  0
  0
  0
  0
  (N L H)
);

// Additional Pre-Game code (only needed with non-standard piece set):

set mypieces assoc
  P "wpawn.png" p "bpawn.png"
  N "wknight.png" n "bknight.png"
  B "wbishop.png" b "bbishop.png"
  R "wrook.png" r "brook.png"
  Q "wqueen.png" q "bqueen.png"
  PC "wfalcon.png" pc "bfalcon.png"
  C "wchancellor1.png" c "bchancellor1.png"
  F "wbird.png" f "bbird.png"
  NR "wnightrider.png" nr "bnightrider.png"
  PR "wduke.png" pr "bduke.png"
  SL "wchampion.png" sl "bchampion.png"
  W "wmoon.png" w "bmoon.png"
  BR "wman.png" br "bman.png"
  A "warcher.png" a "barcher.png"
  BO "wcannon.png" bo "bcannon.png"
  L "wlance.png" l "blance.png"
  H "wbenthero.png" h "bbenthero.png"
  GN "wgeneral.png" gn "bgeneral.png"
  SG "wsergeant.png" sg "bsergeant.png"
  SP "wthief.png" sp "bthief.png"
  K "wking.png" k "bking.png";
setsystem dir "/graphics.dir/alfaeriePNG/";
setsystem pieces #mypieces;

Once this is sorted, I can start in on the text, and probably working with you and/or Fergus on getting the graphics icons I created for this game into the preset.


Edit Form

Comment on the page Vanguard Chess

Conduct Guidelines
This is a Chess variants website, not a general forum.
Please limit your comments to Chess variants or the operation of this site.
Keep this website a safe space for Chess variant hobbyists of all stripes.
Because we want people to feel comfortable here no matter what their political or religious beliefs might be, we ask you to avoid discussing politics, religion, or other controversial subjects here. No matter how passionately you feel about any of these subjects, just take it someplace else.
Avoid Inflammatory Comments
If you are feeling anger, keep it to yourself until you calm down. Avoid insulting, blaming, or attacking someone you are angry with. Focus criticisms on ideas rather than people, and understand that criticisms of your ideas are not personal attacks and do not justify an inflammatory response.
Quick Markdown Guide

By default, new comments may be entered as Markdown, simple markup syntax designed to be readable and not look like markup. Comments stored as Markdown will be converted to HTML by Parsedown before displaying them. This follows the Github Flavored Markdown Spec with support for Markdown Extra. For a good overview of Markdown in general, check out the Markdown Guide. Here is a quick comparison of some commonly used Markdown with the rendered result:

Top level header: <H1>

Block quote

Second paragraph in block quote

First Paragraph of response. Italics, bold, and bold italics.

Second Paragraph after blank line. Here is some HTML code mixed in with the Markdown, and here is the same <U>HTML code</U> enclosed by backticks.

Secondary Header: <H2>

  • Unordered list item
  • Second unordered list item
  • New unordered list
    • Nested list item

Third Level header <H3>

  1. An ordered list item.
  2. A second ordered list item with the same number.
  3. A third ordered list item.
Here is some preformatted text.
  This line begins with some indentation.
    This begins with even more indentation.
And this line has no indentation.

Alt text for a graphic image

A definition list
A list of terms, each with one or more definitions following it.
An HTML construct using the tags <DL>, <DT> and <DD>.
A term
Its definition after a colon.
A second definition.
A third definition.
Another term following a blank line
The definition of that term.